CYW43907, custom bootloader

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
cedric_roomz
Level 4
Level 4
50 replies posted 50 sign-ins 25 replies posted

Hi,

I'm starting to develop a custom bootloader which will be able to receive a firmware over uart and write it on flash. I've started from the tiny_bootloader provided in the wiced example and have integrated the sflash_write example and the uart driver.

For now I'm having issue during link, it does not find all variables which shall be provided by the linker: undefined reference to `link_aon_data_location' 'link_aon_data_end' 'link_ram_data_location'

See build output:

"C:\\workspace\\wiced\\WICED-Studio-6.6\\43xxx_Wi-Fi\\make.exe" roomz.custom_bootloader-CYW943907AEVAL1F JTAG=jlink download run 
MAKEFILE MAKECMDGOALS=roomz.custom_bootloader-CYW943907AEVAL1F download run OTA2_SUPPORT is disabled
Building Bootloader waf.bootloader-NoOS-NoNS-CYW943907AEVAL1F-P103-SoC.43909
Building Serial Flash Loader App
prgm hdr cnt=3
total_size = 15920, entry_point = 0x696000 
Loadsegment_offset = 0xA0 segment_size = 15684, segment_pad = 0
Loadsegment_offset = 0x3DF0 segment_size = 32, segment_pad = 0
Loadsegment_offset = 0x3E14 segment_size = 204, segment_pad = 0
Finished Building Bootloader
Finished Building Serial Flash Loader App


Making roomz.custom_bootloader-CYW943907AEVAL1F.elf
build/roomz.custom_bootloader-CYW943907AEVAL1F/Modules/apps/roomz/custom_bootloader/roomz_bootloader.o: In function `load_app':
C:\workspace\wiced\WICED-Studio-6.6\43xxx_Wi-Fi/apps/roomz/custom_bootloader/roomz_bootloader.c:140: undefined reference to `link_aon_data_location'
C:\workspace\wiced\WICED-Studio-6.6\43xxx_Wi-Fi/apps/roomz/custom_bootloader/roomz_bootloader.c:140: undefined reference to `link_aon_data_end'
tools/makefiles/wiced_elf.mk:315: recipe for target 'build/roomz.custom_bootloader-CYW943907AEVAL1F/binary/roomz.custom_bootloader-CYW943907AEVAL1F.elf' failed
C:\workspace\wiced\WICED-Studio-6.6\43xxx_Wi-Fi/apps/roomz/custom_bootloader/roomz_bootloader.c:140: undefined reference to `link_ram_data_location'
collect2.exe: error: ld returned 1 exit status
make.exe[1]: *** [build/roomz.custom_bootloader-CYW943907AEVAL1F/binary/roomz.custom_bootloader-CYW943907AEVAL1F.elf] Error 1
make: *** [main_app] Error 2
Makefile:351: recipe for target 'main_app' failed

 

However those variables seems to be present in the map file in 43xxx_Wi-Fi\build\roomz.custom_bootloader-CYW943907AEVAL1F\binary\roomz.custom_bootloader-CYW943907AEVAL1F.map

cedric_roomz_0-1661239661512.png

 

Any idea why the linker does not find them?

0 Likes
1 Solution
cedric_roomz
Level 4
Level 4
50 replies posted 50 sign-ins 25 replies posted

After some digging I found that there is some magic which chose the link command using the app name in:

\\Desktop-gqohcdq\c\workspace\wiced\WICED-Studio-6.6\43xxx_Wi-Fi\WICED\platform\MCU\BCM4390x\BCM4390x.mk

 

Now I find that the bootloader does (unsurprisingly) not fit the 8KB AON ram. 

c:/workspace/wiced/wiced-studio-6.6/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: build/roomz.custom_bootloader-CYW943907AEVAL1F/binary/roomz.custom_bootloader-CYW943907AEVAL1F.elf section `.text' will not fit in region `AONRAM'

c:/workspace/wiced/wiced-studio-6.6/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: region `AONRAM' overflowed by 25532 bytes

 

Is it possible to put my custom bootloader in "normal" RAM ?

View solution in original post

0 Likes
2 Replies
cedric_roomz
Level 4
Level 4
50 replies posted 50 sign-ins 25 replies posted

After some digging I found that there is some magic which chose the link command using the app name in:

\\Desktop-gqohcdq\c\workspace\wiced\WICED-Studio-6.6\43xxx_Wi-Fi\WICED\platform\MCU\BCM4390x\BCM4390x.mk

 

Now I find that the bootloader does (unsurprisingly) not fit the 8KB AON ram. 

c:/workspace/wiced/wiced-studio-6.6/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: build/roomz.custom_bootloader-CYW943907AEVAL1F/binary/roomz.custom_bootloader-CYW943907AEVAL1F.elf section `.text' will not fit in region `AONRAM'

c:/workspace/wiced/wiced-studio-6.6/43xxx_wi-fi/tools/arm_gnu/win32/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: region `AONRAM' overflowed by 25532 bytes

 

Is it possible to put my custom bootloader in "normal" RAM ?

0 Likes
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

What all changes have you done to implement the custom bootloader? Can you provide an approximate idea of how much memory space this bootloader is consuming?

Thanks

Aditi

0 Likes