Build thin application for arduino

asked 2015-04-21 18:48:23 -0700

henryson gravatar image

updated 2015-04-21 18:51:16 -0700

I'm trying to build example to work on arduino due with gt202 kit, below is my step

  • Copy due_led.cpp due_led.h (located at ajtcl\target\arduino\examples\AJ_LedService) to ajtcl\test location and change due_led.cpp to due_led.c
  • Modify SConscript file to build due_led

if env['AJWSL'] == 'due': env['aj_obj'] = env.Object(env['aj_srcs'] + env['aj_sw_crypto'] + env['aj_malloc'] + env['aj_crypto_ecc'] + env['aj_external_sha2']) env['aj_obj'] += env.Object(wsl) env['aj_obj'] += env.Object(due_src) env['aj_obj'] += env.Object(rtos_src)

# Build standard ajtcl test programs
env.Program('test/due_led', ['test/due_led.c'] + env['aj_obj'])
#env.Program('test/svclite', ['test/svclite.c'] + env['aj_obj'])
#env.Program('test/clientlite', ['test/clientlite.c'] + env['aj_obj'])
#env.Program('test/siglite', ['test/siglite.c'] + env['aj_obj'])
#env.Program('test/nvramtest', ['test/nvramtest.c'] + env['aj_obj'])
#env.Program('test/sessionslite', ['test/sessionslite.c'] +

env['aj_obj']) #env.Program('test/codisco', ['test/codisco.c'] + env['aj_obj']) #env.Program('test/scan-n-con', ['test/scan-n-con.c'] + env['aj_obj'])

Sorry for code format i cannot correct it, I copy from line 556 of SConscript file

Does build steps above correct ? Thanks much

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-22 09:21:52 -0700

jprestwo gravatar image

Building for the GT-202 kit has nothing to do with building for the "arduino" target. They are two completely separate things. First of all you should never need to modify the SConscript. Second of all, the samples/tests for the build target "arduino" will not work with the WSL target. The WSL target has no relation to the conventional "Arduino" except for the board it uses. It does not use the "sketch" model nor does it use the Arduino IDE. If you want to use the Arduino IDE and all the convenient libraries that goes along with that you must get the ethernet or wifi shield for the Arduino and build with "scons TARG=arduino".

edit flag offensive delete publish link more


Hi jprestwo I mean, I want to build example that located here "ajtcl-14.12.00-src\samples\basic" In order to build it (basic_client), first copy it into test folder and then modify SConscript file to build it. in my opinion this is the simplest way to build example.

henryson ( 2015-04-22 20:12:17 -0700 )edit

The sconscript doesn't actually build anything for the arduino target. It copies everything into a folder that can be compiled by the arduino IDE. If copying/renaming files into the test folder achieves what you want to do then that's fine, but I still don't quite understand because running "scons TARG=arduino" will already do the necessary build steps for the due_led.cpp sample.

jprestwo ( 2015-04-23 09:08:14 -0700 )edit

Thanks jprestwo

henryson ( 2015-05-06 21:53:40 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-04-21 18:48:23 -0700

Seen: 232 times

Last updated: Apr 22 '15