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.

RTOS/CC3220SF-LAUNCHXL: Store a configuration file into the board

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: CC3220SF, UNIFLASH

Tool/software: TI-RTOS

Hi,

I want to load a configuration file which might contain wireless AP information or board-specific parameters into the CC3220SF board with TI-RTOS image. After the project is built via CCS IDE, i use Uniflash to flash the project's .bin file (output) into the board. In Uniflash, i load .bin file via Simple page, then click Advanced, User Files respectively. When User Files is selected, Uniflash displays directory hierarchy of the board. There is mcuflashimg.bin file under the sys folder. Next, i add a configuration file in same directory. Finally, i click Burn, Program Image buttons to burn the image into the board. Although i use both absolute and relative paths to open the file in source code with fopen function, file content is always empty. I have a few questions about it.

First question is how to load any text file in the board and how to access it to read.

Second question is about .cmd file. If i create a memory part and define a section part related to this memory, can i map a text file into this section when creating .bin file?

Last question is about weird operation. In case of mcuflashimg.bin in the board only, it doesn't return error when i use "r" parameter with fopen function. Why?

Thanks in advanced.

  • Hi Orcun Ozkablan,

    What do your file system calls look like? fopen sounds like a FatFs API. The application must access user files in the external serial flash (which is what you're doing) through the NWP. You'll need to use sl_FsOpen and similar calls since the NWP manages the serial flash.

    You'll likely find this Secure File System SimpleLink Academy helpful: dev.ti.com/.../

    Additionally, you should be able to place user files in the sys/, but you'll have to navigate to that folder. You can also add user files without a folder structure. Please see the Adding a User File section of the UniFlash ImageCreator Basics SimpleLink Academy: dev.ti.com/.../

    User files in CC3220 devices are all handled by the NWP in the external serial flash. This is how we maintain a secure file system. This cannot be set by the application binary.

    Best regards,
    Sarah
  • Hi Sarah,

    Thank you so much for your help, the problem is solved when i use sl_Fs function calls.
    To help others who encounter similar problem, sl_Fs functions have to be called after sl_Start, otherwise you might encounter a problem is which sl_FsOpen returns -2018 :)

    Best regards,