We are trying to design a custom system using the CYW43907 which will have a different (maybe non-Cypress) SPI Flash on it.
thank you
Solved! Go to Solution.
I will try to provide a rough outline for a new sflash bringup in WICED SDK for 43907, which might need some further tuning for your chosen sflash to make it completely functional.
Hope it helps to bring up the flash of your choice!
For the second part of the question, the normal_image_defines.mk is the comprehensive list of the memory map. If you want to check the exact FS area in sflash, you can check the wiced_apps.mk file and building with VERBOSE=1 will also help in understanding that part.
I will try to provide a rough outline for a new sflash bringup in WICED SDK for 43907, which might need some further tuning for your chosen sflash to make it completely functional.
Hope it helps to bring up the flash of your choice!
For the second part of the question, the normal_image_defines.mk is the comprehensive list of the memory map. If you want to check the exact FS area in sflash, you can check the wiced_apps.mk file and building with VERBOSE=1 will also help in understanding that part.
Thanks for the first part. Now that I know where to look it is all there. This has been my experience with WICED for 2 weeks now. If you know where to look it is all there but nothing I can find says "this is how you do X".
For the second part, I looked at normal_image_defines.mk and built the whole thing VERBOSE. looking at all 1500 lines, I can see how it builds the RAM image as it adds to the code but nothing on how the flash is partitioned. Maybe I am used to embedded SDKs coming from the other direction: you define you flash map in a linker file (place bootloader, app, FS, etc) then use those constants to start up your file system etc. So I am trying to figure out where to define the map.
Or is it the other way around: do I just fire up the FS and the Flash map is created as the project is built? I would think at least a FS size need to be defined but wiced_filesystem_init() does not have parameters and wiced_filesystem.h does not have a size definition.
I am not sure if this helps, but build/your_app_name/resources folder may give you some idea how resource is implemented on WICED.
"I just fire up the FS and the Flash map is created as the project is built? I would think at least a FS size need to be defined but wiced_filesystem_init() does not have parameters and wiced_filesystem.h does not have a size definition." ---> Correct
The linker scripts that you were looking for can be found at 43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/GCC. To find out how the map is created, you can check the wiced_apps.mk and find the build rules for resources as mentioned below:
define BUILD_APPS_RULES
$(if $($(1)),$(eval $(1)_ENTRY_COUNT := 1),$(eval $(1)_ENTRY_COUNT := 0))
$(if $($(1)),$(eval $(1)_SECTOR_START := $(CURRENT_SECTOR)),$(eval $(1)_SECTOR_START := 0))
$(if $($(1)),$(eval $(1)_SECTOR_COUNT := $(shell $(PERL) $(SECTOR_COUNT_SCRIPT) $($(1)) 0 4096)),$(eval $(1)_SECTOR_COUNT := 0))
$(if $($(1)),$(eval $(1)_SECTOR_ADDRESS := $(shell $(PERL) $(SECTOR_ADDRESS_SCRIPT) $($(1)_SECTOR_START) 4096)),)
$(if $($(1)),$(eval CURRENT_SECTOR := $(shell $(PERL) $(SECTOR_COUNT_SCRIPT) $($(1)) $(CURRENT_SECTOR) 4096)),)
$(if $($(1)),$(eval $(1)_IS_SECURE := $(if $($(1)_SECURE), $($(1)_SECURE), 0)), $(eval $(1)_IS_SECURE := 0))
$(eval APPS_HEADER_DEFINES += -D$(1)_ENTRY_COUNT=$($(1)_ENTRY_COUNT))
$(eval APPS_HEADER_DEFINES += -D$(1)_SECTOR_START=$($(1)_SECTOR_START))
$(eval APPS_HEADER_DEFINES += -D$(1)_SECTOR_COUNT=$($(1)_SECTOR_COUNT))
$(eval APPS_HEADER_DEFINES += -D$(1)_IS_SECURE=$($(1)_IS_SECURE))
endef
You can also check the config.mk file for waf.sflash_write-NoOS-CYW943907AEVAL1F-P103-SoC.43909.generated as a part of the build process to check the Linker script and starting ML provided for the sflash and how the FS image is downloaded.