2010-08-16 09:57 AM
File in flash at static address
2011-05-17 06:09 AM
using RIDE you can use this
at 0x8EFF code uint8_t v[]={1,2,3,4,5,6,7,8,9}; in that, data will be at 8EFF ROM, ithink this a standard C command but some variation on compiler to compiler2011-05-17 06:09 AM
yes but i dont want to write my 16KB file inside the code...
another way?2011-05-17 06:09 AM
did not get your point, im also new to STM. but ithink there NO feature that you can alter your ROM without using any programmer. but some STM go with this internal EEPROM. or you can have programmer on board
2011-05-17 06:10 AM
Well I have a programmer the discovery board
for example freescale have an option in the compiler HEXFILE which accept srecord or intel hex file to be put im the cpu at the moment on linking/programming2011-05-17 06:10 AM
2011-05-17 06:10 AM
Hi julien,
i would suggest the following. 1. You have to reserve the space for the 16KB file in your c code. 2. This can be done by an array variable at a given address see also http://www.cosmicsoftware.com/faq/faq3.php 3. Now the tricky part of the solution. Actually there is no tool from ST available to flash just a specific area. 4. BUT you can use the STVP programming toolkit. http://www.st.com/stonline/products/support/micro/files/um0151.exe http://www.st.com/stonline/books/pdf/docs/11472.pdf 5. There is a function in the dll to program a part of the device’s memory int EProgArea(DWORD dwAreaId, long FirstAddr,long LastAddr) 6. Unfortunately the apisample.exe distributed with STVP programming toolkit does not support the EProgArea function call. 7. So you have to write your own flash-tool or just modify the apisample.exe. 8. The source code can be found in um0151.exe. It is a Visual Studio 6 Project. But I used Microsoft Visual Studio 2010 Express to convert and compile the apisample successfully. Visual Studio 2010 Express can be found here: http://www.microsoft.com/express/Downloads/#2010-Visual-CPP BTW, if you are a student you can download Visual Studio 2010 Professional Edition at https://www.dreamspark.com/default.aspx. But Express edition will also do the job. 9. Add the EProgArea-function with new commanlineswitch -FileProgArea to apisample source and save it as APISampleExtended.exe 10. Now you can program the device using the default -FileProg switch. (Remeber the array variable will reserve the needed space for 16KB file) 11. Next use APISampleExtended.exe to program the 16KB file to flash memory. Example command line for STM8S-STM8S207R8: APISample.exe -BoardName=ST-LINK -Device=STM8S207R8 -Port=USB -ProgMode=SWIM -no_loop -no_log -FileProg=myProg.s19 APISampleExtended.exe -BoardName=ST-LINK -Device=STM8S207R8 -Port=USB -ProgMode=SWIM -no_loop -no_log -FileProgArea=myFile.s19,0x14000 Regards Stefan2011-05-17 06:10 AM
Thanks seem the best solution out there
if I do it ill try to post the extended app so other may use it too2011-05-17 06:10 AM
Unless I'm missing something, you should be able to do what you want by using STVP. You'll have to create a project. Once you've done that click on Project:Edit and in the Properties tab unselect the ''Clear memory before loading file'' check box.
You can then use File:Open to load multiple .s19 files into the buffer. jdf