Flash-Programming

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Flash-Programming

Privat
Hi,

we are working on a Ecos-Project using the freescale MPC5668g with CFL90.
My collague and i have created a section in the flash memory, where we
intended to persistent  store some data-

We used the Linker Script Variables to retrieve the pointers to a
section of memory we declared.
Using these we tryied to issue a write Command to that address - and
recive an Programm Error 4.
Is there some particular assembler magic necessary to write to Flash?

According to our DataSheets, the plattform we are on, does not work with
a MPU - so this should not be the source ouf our troubles.

We tryied to write to other locations, using the block adresses recived
with the given functions- and just managed to crash our program there
(it first seemed we overshot and either got a address in RAM, but as it
also crashed after re-boot, we concluded some damage done to the image
in FLASH.

My Question:
Is there some trick regarding writting and reading from Flash? Do we
need more NOPs? Is there some software Managment Entity, preventing
unauthorized writes or reads to flash?
Any advice is welcme.

Regards Picasso





--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Flash-Programming

Privat
A little Update,

as Max - who integrated the JournalingFlash Protokoll for our plattform,
informed me, we should use the
#include <cyg/io/ssd_c90fl.h>
library to read and write to flash. I included the header, updated the
ECOS via the configurator- the problem is can not us the external functions
"extern UINT32 FlashInit ( PSSD_CONFIG pSSDConfig );"

The objectfile containing the precompiled functions is there- but is not
found by the Linker who errors with : " undefined reference to `FlashInit'"

How to modify the makefile of ecos in such a way that linking is possible?


Regards Picasso

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: Flash-Programming

Leschke Serafin (lesc)
Don't know if that solves your specific problem but I have found that in
some occasions when changing things in the configtool it helps to delete
the <project>_build and <project>_install folder beforehand, only then
you are sure to get a clean build.

Serafin

On 20.01.2016 10:47, Privat wrote:

> A little Update,
>
> as Max - who integrated the JournalingFlash Protokoll for our plattform,
> informed me, we should use the
> #include <cyg/io/ssd_c90fl.h>
> library to read and write to flash. I included the header, updated the
> ECOS via the configurator- the problem is can not us the external functions
> "extern UINT32 FlashInit ( PSSD_CONFIG pSSDConfig );"
>
> The objectfile containing the precompiled functions is there- but is not
> found by the Linker who errors with : " undefined reference to `FlashInit'"
>
> How to modify the makefile of ecos in such a way that linking is possible?
>
>
> Regards Picasso
>


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss