This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200MOD: Questions about SFLASH memory and software updates

Part Number: CC3200MOD
Other Parts Discussed in Thread: CC3200


We are using the CC3200MOD.  This device has a serial Flash (SFLASH) internally.   My understanding is that SFLASH contains all program code and a bootloader will copy this code into SRAM at startup.   The SFLASH contains 1 Mbyte of space and holds (among other things) the exectuable code image and a file system.   The bootloader uses the lower 16 Kbytes of SRAM for internal purposes while running.

1)  Is there any reason to create a new linker command file for Flash code?  The current linker command file locates everything in SRAM.  Since the final target code will be copied over by the bootloader, the same linker command file can be used for development and the final target image.  Correct?

2) My current binary output is in a .out file and is about 3.8 Mbytes.   The SRAM only holds 256 Kbytes, so the .out file can not be only the executable image.  I assume the rest of the .out file is things like symbols and other things for debug.   How can I create the minimum size binary file with none of the extra stuff?  We need to give the file to a distributor to flash the parts before delivery and there is no benefit for them to get symbols and whatever else is in that file.   I will also need the stripped executable image for software updates in the field (see below).

3) The product is designed to allow code updates.  How do I do that?   Does the binary image appear in the file system with a special file name and the bootloader does the rest?  Our code image is around 160 Kbytes and there won't be enough space to contain two code images in SRAM at the same time.  The new software will be downloaded through the SimpleLink WiFi or other connectivity.  Can I just write it into the file system in some temp file?  After that, how do I make it the new image next time the system reboots?

4)  Assuming I change the executable image in SFLASH, how do I reboot the CPU under software control to get the image to become active?   Is there some kind of API that will do this, or should I just divide by zero?  ;-)

5) How much usable disk space is available on the internal flash?  Worst case, the boot image could be as large as ~220 Kbytes, so is the remainder of the 1 Mbyte available to the file system?  (Yes, I know there is some space take for WiFi management.   I am looking for rough numbers here, I am not counting bytes)

6) The downloader needs 16 Kbytes during startup so we can't locate code there.  Is there a way I can return that 16 Kbytes to the operating system so it can be used for mailboxes and queues or other RTOS objects?

7) The SFLASH uses a SPI bus.  Is that the same SPI bus that comes out for the user or is it a dedicated SPI bus for SFLASH and WIFi?

8)  Interrupt vectors are also loaded into SRAM when the system starts up.   Do these have to start at a specific memory address or does the executable image know how to change the base address?

9)  We have an external SFLASH part to add more nonvolatile storage.  Is there a way to mount this as a second disk so we can use normal disk I/O to manage it?  Is there a document that describes how to do this?

Please let me know of any app notes or data sheets available that cover the file system, boot image details, or other items related to the SFLASH.  I am aware of the CC3200_ProgrammersGuide (swru369c)

Side Note : Is there some place where I can find all documents related to the CC3200?  App notes, data sheets, reference manuals, etc.  It is hard to be sure I have everything.

Second Side Note :  Is there a document that describes all supported parameters and what they do for the XDC configuration file?  I find individual items mentioned in many places in various forums but no single comprehensive list.

  • Hi Dave,

    As first thing what I want to say. If you have extensive requirements to memory resources in your application, you should to consider to move your design to new CC3220MODSF module. Inside CC3200SF can be code executed from flash memory and all RAM is free to RAM stuff (buffres, variables, heap, heap.).

    First 16kB of RAM is reserved to bootlaoder. But nothing prevent you use this RAM for your purpose. This is good place to .stack section, etc. This approach allow to save few valuable kB of RAM.

    Answers to your questions:

    1. You you don't need change linker file. You can use same linker file. ROM bootloader can execute code only which start at address 0x20004000.

    2. I'm not 100% but I don't think that provide option to flash sFlash into module from manufacturing in TI. Conversion into *.bin file is done inside post-build step. From CCS examples:

    "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

    3. This is very complex question. It is to another discussion. But in brief. Bootloader can execute only /sys/mcuimg.bin file. There is no other option. Your code need be in this file. But you can use approach with secondary bootloder. This secondary bootlaoder is inside file /sys/mcuimg.bin and is executed by ROM bootlaoder. Your secondary bootloder will load another file with your standard firmware. This approach is inside OTA update inside CC3200 SDK. OTA update is only "official" way provided by TI for CC3200. Unfortunately with standard OTA update you will probably not get into CC3200MOD sFlash memory space. Maybe later I can describe approach which we use...

    4. Firmware image need to be inside file /sys/mcuimg.bin. There is no option how to use other file. For full SoC reboot you can use this code:

    5. I haven't good news for you. Free space inside CC3200MOD is a big problem. Especially when you need to use files for webserver. Please see this wiki page - Count with me: 2x220kB for your image (it is good to be image filesafe) + 264kB + 200kB for system files = ~900kB. That mean at best case you will have free 100kB.

    6. This RAM is not allocated and used when ROM bootloder returns. Only limitation is that this RAM cannot be used to code (loaded by bootloader), but for you buffers and variables is fine.

    7. This is a dedicated SPI bus. This memory is under control NWP and is encrypted. For simplifying we can say that you haven't direct access to this memory without sl_ Filesystem API.

    8. Image can be executed by ROM bootloader only at address 0x20004000. At this address is rest vector of your code.

    9. This secondary storage (flash memory connected by SPI, I2C or SD card) cannot be controlled by sl_ Filesytem API. You need create own code for direct access into this memory. Inside SDK is available example how to use SD card.


    - Best source of information is a Wiki  - and e2e forum. Unfortunately many valuable information you find only at E2E forum. Some information about boot process you find at OTA example manual in SDK. Unfortunately documentation for CC3200 is not at best state. Documentation for new CC3220 is much better.

    - Question related confirmation of development tools is better at at CSS forum-

    Last suggestion. If you starting new developed really consider to use new CC3220. CC3220 is much better and many API limitations of CC3200 is solved in new generation.