SparkFun Forums 

Where electronics enthusiasts find answers.

Everything with the AmbiqSuite SDK tools and software are welcome here.
#211654
Hi,
i am using the AMbiqSDK and apollo3 BSPs git from sparkfun (updated), and i copied the files from the folder ../boards/apollo3_evb/examples/ble_freertos_amdtps into the ../AMbiqSuiteSDK/boards_sfe/artemis_thing_plus_examples/ble_freertos_amdtps folder. I updated the Makefile file and, using the asb_linker script, the following error appears when executing make:
Code: Select all
...
Compiling gcc startup_gcc.c
 Linking gcc bin/ble_freertos_amdtps_asb.axf with script ../../../../common/tools_sfe/templates/asb_linker.ld
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: bin/ble_freertos_amdtps_asb.axf section `.stack' will not fit in region `sram'
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: region `sram' overflowed by 11000 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:319: bin/ble_freertos_amdtps_asb.axf] Error 1
The lines from the Makefile related to the asb_linker are the following:
Code: Select all
$(CONFIG)/$(TARGET)_asb.axf: LINKER_FILE = ../../../../common/tools_sfe/templates/asb_linker.ld 
$(CONFIG)/$(TARGET)_asb.axf: $(OBJS) $(LIBS)
	@echo " Linking $(COMPILERNAME) $@ with script $(LINKER_FILE)";\
	$(CC) -Wl,-T,$(LINKER_FILE) -o $@ $(OBJS) $(LFLAGS)
However, in case I comment the line
Code: Select all
$(CONFIG)/$(TARGET)_asb.axf: LINKER_FILE = ../../../../common/tools_sfe/templates/asb_linker.ld 
it makes successfully ... so what's the problem in orde to execute the ble_freertos_amdtps in my artemis thing plus board?.
Thanks
You do not have the required permissions to view the files attached to this post.
Last edited by fbtobajas on Tue Jan 28, 2020 9:09 am, edited 2 times in total.
#211657
for what its worth: From Working amdtps makefile for Nano....
$(CONFIG)/$(TARGET)_asb.axf: LINKER_FILE = $(COMMONPATH)/tools_sfe/templates/asb_linker.ld
$(CONFIG)/$(TARGET)_asb.axf: $(OBJS) $(LIBS)
@echo " Linking $(COMPILERNAME) $@ with script $(LINKER_FILE)";\
$(CC) -Wl,-T,$(LINKER_FILE) -o $@ $(OBJS) $(LFLAGS)

file = https://github.com/kerryeven/AndroidArt ... c/Makefile
#211750
Hi @liquid.soulder ... in case i copy the original linker script from the ble_cordio_tag example folder for Apollo3 EVB , and i modified it according to your post, it get compiled, linked and uploaded successfully by using make bootload_svl. Great! ... however, in case i use the asb_svl_linker.ld script from boards_sfe/common/tools_sfe/templates/asb_svl_linker.ld, it fails and the following error is reported:
Code: Select all
Compiling gcc startup_gcc.c
 Linking gcc ../gcc/bin/ble_cordio_tag_svl.axf with script ../../../../common/tools_sfe/templates/asb_svl_linker.ld
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: ../gcc/bin/ble_cordio_tag_svl.axf section `.stack' will not fit in region `sram'
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: region `sram' overflowed by 11000 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:444: ../gcc/bin/ble_cordio_tag_svl.axf] Error 1
Does it make sense to you? ... can the asb_linker.ld / asb_svl_linker.ld files provided into the boards_sfe folder have some error?. Thanks for your help!
#211764
Makefile.txt
I was successful (after 2 full days) of moving the amdtps example from the new SDK 2.3 to boards_sfe using liquid's new makefile strategy. I basically modified the tag makefile a little to create the attached makefile. Here are the steps and the makefile will be attached with .txt on end (as I can't figure out how to upload file with no extension):

AMSDK example to Spark Fun boards_sfe conversion
1) Copy ble_freertos_amdtps directory from SDK/boards/apollo3_evb/examples/ to SDK/boards_sfe/common/examples
2) SDK/boards_sfe/common/examples/ble_freertos_amdtps delete iar and keil directories
3) SDK/boards_sfe/common/examples/ble_freertos_tag/gcc copy ble_freertos_tag_asb.ld and ble_freertos_tag_svl.ld to the SDK/boards_sfe/common/examples/ble_freertos_amdtps /gcc directory.
4) Download attached Makefile (rename to remove .txt extension) and replace SDK/boards_sfe/common/examples/ble_freertos_amdtps /gcc/Makefile with this downloaded Makefile.
5) From git bash terminal cd to SDK/boards_sfe/common/examples/ble_freertos_amdtps/gcc
6) For example edge2 board: type EDGE=edge2
7) type make BOARD=$EDGE
8) will compile to final copy to bin with last line looking like:
Copying gcc ../gcc/edge2/bin/ble_freertos_amdtps_asb.bin...
9) make BOARD=EEDGE bootload_svl will load the board if on COM4 (change in Makefile)
10) if problem with bootload_svl, try bootload_asb. If ever successful with booload_svl, may need to reset board in Arduino with Tools / Burn Bootloader (Programmer: Ambiq Secure Bootloader)
Makefile.txt
You do not have the required permissions to view the files attached to this post.
#211777
Hi @KHE, just an small change. In step 3), it is requierd to rename the file ble_freertos_tag_asb.ld to ble_freertos_amtdps_asb.ld, and the file ble_freertos_tag_svl.ld to ble_freertos_amtdps_svl.ld . I've checked it, and following the steps you provide, i successfully made ble_freertos_amtpds example work in my artemis thing plus board. Thanks!
#211778
oops #3..good thing I'm not a banker....Thank you fbtobajas

so with corrections...

AMSDK example to Spark Fun boards_sfe conversion
1) Copy ble_freertos_amdtps directory from SDK/boards/apollo3_evb/examples/ to SDK/boards_sfe/common/examples
2) SDK/boards_sfe/common/examples/ble_freertos_amdtps delete iar and keil directories
3) SDK/boards_sfe/common/examples/ble_freertos_tag/gcc copy ble_freertos_tag_asb.ld and ble_freertos_tag_svl.ld to the SDK/boards_sfe/common/examples/ble_freertos_amdtps /gcc directory. Rename the file ble_freertos_tag_asb.ld to ble_freertos_amtdps_asb.ld, and the file ble_freertos_tag_svl.ld to ble_freertos_amtdps_svl.ld .
4) Download attached Makefile (rename to remove .txt extension) and replace SDK/boards_sfe/common/examples/ble_freertos_amdtps /gcc/Makefile with this downloaded Makefile.
5) From git bash terminal cd to SDK/boards_sfe/common/examples/ble_freertos_amdtps/gcc
6) For example edge2 board: type EDGE=edge2
7) type make BOARD=$EDGE
8) will compile to final copy to bin with last line looking like:
Copying gcc ../gcc/edge2/bin/ble_freertos_amdtps_asb.bin...
9) make BOARD=$EDGE bootload_svl will load the board if on COM4 (change in Makefile)
10) if problem with bootload_svl, try bootload_asb. If ever successful with booload_asb, may need to reset board in Arduino with Tools / Burn Bootloader (Programmer: Ambiq Secure Bootloader)
#211907
MAY HAVE TO RENAME BOARD DIRECTORY NAME TO REMOVE UNDERSCORES...

FYI ... Link Problem with redboard_artemis_nano: compiled but wouldn’t link ‘till renamed boards_sfe/redboard_artemis_nano directory to boards/sfe/nano, then it worked fine.

Underscores causing the problem. I renamed board directory to 123456789012345678901 and it worked . 12345678_9012345_6789 had the same error.therefore underscore problem, not length.

Error when NANO=redboard_artemis_nano was used:
Linking gcc ../gcc/redboard_artemis_nano/bin/ble_freertos_amdtps_asb.axf with script ../../../../common/examples/ble_freertos_amdtps/gcc/ble_freertos_amdtps_asb.ld
arm-none-eabi-gcc.exe: error: ../../../../redboar: No such file or directory
make: *** [Makefile:505: ../gcc/redboard_artemis_nano/bin/ble_freertos_amdtps_asb.axf] Error 1

using ARM Gnu 8 2018-q4-major
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]