lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Good to know, thanks!

On Mon, Feb 9, 2009 at 7:37 PM, Doug Currie <doug.currie@gmail.com> wrote:

On Feb 9, 2009, at 12:02 PM, Bogdan Marinescu wrote:

on GCC, and GCC doesn't know about multiple memory spaces, you'll have
a problem with C "const" data on such systems, because it will be
simply copied to RAM (which is already tight) and accessed from there.
But there are some other compilers seem to know how to handle this
issue (don't know if one exists for the dsPIC though)/

The C30 compiler (based on gcc) from Microchip for dsPIC33 and PIC24H knows to keep const data in flash. It can even avoid the "Harvard blues" by mapping a big chunk (32 Kbytes) of data address space to flash using a PSVPAG (Program Space Visibility) register. The compiler will manage the PSVPAG register for you, or let you have control.

That said, I wouldn't necessarily advocate the dsPIC33 or PIC24H over ARM or AVR processors for Lua.

e