Other Parts Discussed in Thread: , ENERGIA, CC3200, UNIFLASH
guys, can you show me sources of very simple bootlodr which can work with serial flash memory and program memory. and which i can load by uart.
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.
Hi,
It is important to know if you want to use CC3220S(R) or CC3220SF device. How CC3220SF chip is designed, it is slightly complicated to create own bootloader. Because content of XIP flash (on-chip) flash is synchronised with firmware file inside sFlash by the ROM bootloader. Two possible ways:
- execute your code only from RAM not from XIP flash (S and SF)
S(R): ROM bootloader -> copy user bootloader into RAM -> run user bootloader from RAM -> copy firmware into RAM -> execute code from RAM
SF: ROM bootloader -> synchronise XIP (user booloader file) -> run user bootloader from XIP -> copy firmware file to RAM -> execute code from RAM
- execute code from top bank of XIP flash (SF only)
SF: ROM bootloader -> synchronise XIP (user booloader file) -> run user bootloader -> execute firmware from 2nd bank of XIP (in this stage can be also synchonised 2nd bank of XIP with your firmware file)
None of this way is officially supported by TI. Implementation will be up to you. I have personally done small bootlaoder for Energia ( 
 ). Main idea of this bootlaoder comes from bootloader from previous generation SDK (CC3200).
Jan
Hi,
 
 ... but you file need to be compiled to be able execute from RAM not from XIP flash. For this purpose you need properly set linker file. For example you can take linker file from CC3220S devices from SDK.
 
 In case of that your code is not big (all fit into 256kB RAM), this way is possible.
 
 Jan
and my custom OTA update will look like:
 1) first start chip at new PCB - load my Custom BootLoader (CBL) (signed by Uniflash) by uart production line programmer and start it;
 2) by CBL(uart part) load raw bin with my main program and save it as file main1.bin to external sFlash
 3) if UART is disconnected - start bootloader, copy main1.bin to ram and run program
 4) if my server has a main2.bin - my program download it from server to sFlash as main2.bin
 5) if bootloader see new file - run it and delete old main1.bin and rename main2.bin to main1.bin
 
 looks nice, but my chip is works for 1-3 secs and go to hib for 180 secs.
 this "petrushka" (russisan situation character) is not for our case of work.
 is any way to save bin file to XIP flash and run it after custom OTA update?
upd: a forgot about it
>>> execute code from top bank of XIP flash
how to do it?
 
 p.s. where did you found out asm code list?
 p.p.s. idiot question, but where in CCS i can see size of bin file and RAM usage?
Hi,
 
 As I said you can store your code into 2nd bank of XIP flash and from bootlaoder jump to this code for execution. Detailed information about XIP flash you find at TRM ( www.ti.com/.../swru465 ) chapter 21. For writing into XIP flash you can use \source\ti\devices\cc32xx\driverlib\flash.h
 
 - ASM code comes from secondary bootlaoder from previous generation (CC3200) SDK. But it is not a rocket science. This code you can also use to executing from XIP flash.
 - memory areas are configured in linker file (*.cmd file) inside your CCS project
- for determining sizes of memory section you can use Memory Allocation tool in CCS
 Jan
i see. chapter 21.6. 
 trying...
 
 - where can i find out asm code list document for cc322sf?
 - no!) i need where can i see how many bytes will be at flash and RAM usage (as atmel studio after build console show : "20188bytes of flash usage, 48% ram allocated")