This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001561] Internal flash driver for Freescale TWR-K60N512 board


Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001561

--- Comment #21 from Ilija Kocho <ilijak@siva.com.mk> 2012-06-20 08:48:42 BST ---
Hi Nicolas

I'm sorry for late reply, but I was busy. I tried to disable keeping Redboot
configuration data in FLASH bit it still raises exception. Can you post your
ECM file?

(In reply to comment #20)
> Hi Ilija,
> 
> I have made some tests and in order for the driver to work, I desactivated the
> "Redboot FIS support" (in Redboot ROM monitor -> Allow RedBoot tu support FLASH
> programming) and desactivated the "Keep Redboot configuration data in flash"
> option.
> When this options are enabled, Redboot try to read a portion of flash  (with a
> memcpy) which leads to a problem.

Have you tried with cyg_flash_read()? It is recommended in manual and I would
recommend too.

> 
> I also try to move the CYG_FLASH_DRIVER into a new kinetis_flash.c file and add
> it to the file to be compile in the .cdl file. Redboot builds fine with it but
> when I launch it, it seems that there is no flash init done. I'll keep working
> on that but if you have any idea of what I am missing ...

Probably the object file containing CYG_FLASH_DRIVER has been discarded by the
linker since effectively there aren't references to it.
If the driver is general for all Kinetis devices you can leave it in
kinetis_misc.c or put it in kinetis_flash.inl and include in kinetis_misc.c.
Otherwise you can put copies in platforms (see STM32 for example). However
driver inclusion for compilation should be conditional with some #ifdef.

Ilija

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]