Cortex-M0 and SPIFI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cortex-M0 and SPIFI

383 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by peufeu on Fri Mar 08 00:36:28 MST 2013
Hello !

I'm making an application that will communicate via ethernet, using a stream of UDP packets, and also USB.

I'd like to have the Cortex-M0 handle the communication tasks, and present a simple "pipe" interface to the M4, which will apply some DSP on the data. The docs about IPC between the cores seem to indicate this should not be too complicated. Basically the M0 will rx and tx UDP packets (handling retransmissions if needed), generate and parse IP/UDP headers, handle ARP, USB, etc. The M0 will be a sort of smart network/USB interface. So the M4 will be entirely available for DSP, it doesn't need to know the details of where the data comes from or where it goes.

The cpu will be LPC4330 with a spifi flash, I'm using LPCXpresso, and right now LPC4330-Xplorer.

I'd like to keep RAM for buffers, which means moving some of the code to SPIFI flash, especially code that isn't speed-critical, like initializations, ARP, USB descriptors, etc.

Question is : how can I tweak the project and link settings to put some of the M0 code in SPIFI flash ? The Dual Core examples put it all in RAM, which I'd like to avoid, ideally. I haven't found the info about how the address mappings work ; ok, the M0's zero memory address is shifted so its vectors are put where we want it, but it also accesses shared memory, so those addresses must not be shifted, right ?
Labels (1)
0 Kudos
3 Replies

362 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by peufeu on Thu Mar 14 02:46:25 MST 2013
Yep. I had a look.

Those projects compile the M0 code to a binary file, which is integrated into the M4 main binary, which is loaded into SPIFI.
The M0 project is configured with one RAM region available, so the M0 compiler only knows about this.

At boot, the bootloader the M0 binary into the RAM region specified, and the M4 launches the M0. So, the M0 does not know about SPIFI flash.

Anyway, I don't think I'll need it. I hadn't realized how compact the thumb code is. Moving the "slow" parts to SPIFI would only save a couple kB of RAM. So, I'm not going to bother.
0 Kudos

362 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Wed Mar 13 12:44:00 MST 2013
Maybe the dual-core examples in the LPCOpen platform will help. These examples have both cores running from internal or SPI FLASH and have some example projects for LWIP/USBLIB/FreeRTOS/etc. running on both cores.
http://www.lpcware.com/content/nxpfile/lpcopen-platform
0 Kudos

362 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by peufeu on Wed Mar 13 10:55:23 MST 2013
No ideas guys ?
0 Kudos