Recently,I ''m under a project with C8051F350.This MCU have 24bit ADC ,8K flash ,256+512Bytes RAM,and one of the most improtant is that ,the flash can be usedlike eeprom with 512bytes per sector earse,althoughit''scapability upto 8k ,the last sector is reserve.The module in my project ,Exucted code comes to 6672 bytes,that seen enought.Anohter problem came up when i use the sector start at 0x1c00,no respone ,and the data can''t write into sector 0x1c00.I get the datasheet and read againt.And i found some notes:
When one of the flash page/sector is locked ,the page/sector located at 0x1c00 is locked.That means can''t eigther earsenor write.Excute code can''t optimize anymore .Must be another way!
I met this before.I solved that by using scatter relocated the obj to non-sequence address.Under the same way,i google the relocated in Keilc .
Finally ,Idone!
Here is a example for Relocate functions.
For more detail ,RE me.
>> 阅读全文