2008-10-27 05:32 AM
STM32F103-EVAL execute function from NOR
2011-05-17 03:48 AM
My goal is to have my main application that is stored in internal flash call a function stored in external NOR flash. What options do I have to accomplish this?
Looking at the STM32F103-EVAL board schematic, it seems the only way to program the NOR flash is via the STM32 itself, not by JLink. I was able to compile and run the FSMC NOR example, which demos erase/write/read operations with simple data. The FSMC NOR_CodeExecute example requires that NOR be programmed with an external tool, which the STM32F103-EVAL doesn't support. Has anyone successfully program NOR via the STM32 with a function and executed it? Thanks in advance.2011-05-17 03:48 AM
Enjoyed your post - just received my EVAL-E board today - will investigate and report.
Your issue has broader implications - perhaps this is a means by which those with ''special expertise'' can embed (and secure) their code w/in the STM32 and allow subsequent user-programmers to customize the functionality as they desire. Such capability may be of interest to those forum posters able to accept, ''not invented (entirely) here!''2011-05-17 03:48 AM
Hi Lonnie,
You can use the DFU provided with ST USB package to program the NOR Flash. You have to create a DFU file containg your function code. Cheers, Y19812011-05-17 03:48 AM
I was able to install the USB DFU on my PC and the required firmware on the dev board. I did successfully program and execute from NOR flash, but the DFU took over 15 minutes to program 128 mega bits. That seems excessive, maybe something is misconfigured.
I was also able to follow the NOR example and program NOR with executable code. In order to do this, I placed my function at a specific address in internal flash. I then copied that function to NOR using the WriteBuffer function provided with the NOR driver. In the ICF file I set the address of the function in internal flash using ''place address at''. I told the linker that I would initialize the function manually and to place the function into NOR memory area. I'm using IAR build tools. [ This message was edited by: lonnie.walker on 27-10-2008 18:02 ]2011-05-17 03:48 AM
Are you using one of the recommended Toolchains (RVMDK, EWARM, HITOP)? Then follow the instructions in the readme.txt located in the ''examples\FSMC\NOR_CodeExecute\binary'' folder.