cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

New Contributor II

Hello,

in order to speed up the downloading process time on the CYW943907AEVAL1F board, is there any way to download code and data directly to the RAM ?

Thank you.

1 Solution
New Contributor II

Well, actually, it is pretty straightforward.

You just need to load the application ELF file in RAM with OpenOCD (+some initializations coming from the sflash_write TCL script).

After all, it's what the tiny bootloader does.

You still may need to download DCT first (we manage to stub the access to avoid this soon).

Now, the application is loaded and reset in less than 3 seconds (even less if you keep the OpenOCD session open), instead of 25 seconds when using flash.

I could post the script here if someone is interested, but I would prefer that it comes from the Cypress team to avoid mistakes.

View solution in original post

0 Likes
Reply
7 Replies
Moderator
Moderator

Sorry there is no way of downloading directly to RAM in CYW43907

0 Likes
Reply
New Contributor II

Do you mean that it's not feasible, because of hardware restrictions or some sort of ROM bootloader issues, or that we have to write dedicated linker and OpenOCD scripts ?

0 Likes
Reply
New Contributor II

Well, actually, it is pretty straightforward.

You just need to load the application ELF file in RAM with OpenOCD (+some initializations coming from the sflash_write TCL script).

After all, it's what the tiny bootloader does.

You still may need to download DCT first (we manage to stub the access to avoid this soon).

Now, the application is loaded and reset in less than 3 seconds (even less if you keep the OpenOCD session open), instead of 25 seconds when using flash.

I could post the script here if someone is interested, but I would prefer that it comes from the Cypress team to avoid mistakes.

View solution in original post

0 Likes
Reply
Moderator
Moderator

Hello,

Thank you so much for the pointers.

I am exploring the sflash_init function in sflash_write.tcl script which downloads the sflash_write into RAM and executes it.

>>openocd-all-brcm-libftdi.exe -s ../scripts -f ../CYW9WCD1EVAL1.cfg -f ../BCM4390x.cfg -f C:\Users\riya\Documents\WICED-Studio-6.4\43xxx_Wi-Fi\apps\waf\sflash_write\sflash_write.tcl -c "sflash_init CYW943907AEVAL1F-P103-SoC.43909 43909"

Please let me know if you were able to test running an application directly on RAM. I am facing error in determining the entry_address for the provided binary.

0 Likes
Reply
New Contributor II

I don't understand, you don't work for Cypress ?

0 Likes
Reply
Moderator
Moderator

Hello,

The sflash_init can be used for downloading into RAM. The load_image command takes two arguments : image to be downloaded and the RAM address. load_image internally calls the OPENOCD loadimage command to download the file at the given address and than the PC value can be set to the starting address.

Are you trying to run the APP0 application from directly from RAM? or trying to reset the device faster by downloading and running the waf.bootloader onto RAM.

As per the boot process, the ROM bootloader checks a valid image at 0x1400 0000. The valid image will have a trx header as mentioned in the file  /43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/make_trx.pl

New Contributor II

See attached the (quick'n dirty) scripts that I use (windows only).

As it stops the CPU and jumps to the entry point, it bypass the bootloader.

As I said, I just copied the commands from the sflash_write tool.

Usage:

load_elf.bat <path_to_your_elf>

ex:

load_elf.bat build\test.powersave-CYW943907AEVAL1F\binary\test.powersave-CYW943907AEVAL1F.stripped.elf