7 years, 5 months ago.

How can i port example from LPC4337 to LPC18s37?

I've to port some example like blinky from a lpc4337 to LPC18s37. I've already flash this firmware (LPCXpresso4337 firmware image 2015-04-27 v0221) but , according to the README of the mbed library for my lpc, I have to choose which core to use, cause the default one is M4 but my board has only one M3.

The README said: "The NXP LPC43xx microcontrollers includes multiple Cortex-M cores in a single microcontroller package. This port allows mbed developers to take advantage of the LPC43xx in their application using APIs that they are familiar with. Some of the key features of the LPC43xx include:

Dual core ARM Cortex-M4/M0 both capable of up to 204 MHz Up to 264 KB SRAM, 1 MB internal flash Two High-speed USB 2.0 interfaces Ethernet MAC LCD interface Quad-SPI Flash Interface (SPIFI) State Configurable Timer (SCT) Serial GPIO (SGPIO) Up to 164 GPIO The NXP LPC18xx is a single core Cortex-M3 implementation that is compatible with the LPC43XX for cost-sensitive applications not requiring multiple cores.

I've tried to inlude my board like that but it doesnt work, can you help me?

include "mbed.h" include "LPC43xx.h" define CORTEX_M3 define CORE_M3

DigitalOut myled(LED1);

int main() { while(1) { myled = 1; wait(0.2); myled = 0; wait(0.2); } }

Someone can correct me, but I am not seeing LPC18S37 as a valid mbed-target. Porting a board to mbed can be done but will be very challenging. You would have to really know what you were doing and be willing to spend a lot of time. If you want to use mbed, your best bet is to buy another board that is supported by mbed.

posted by Graham S. 31 May 2017

I have the board 18s37 and it is a board of the 18xx family which are labeled as 4337 because the layout is the same. I have the same issue, dow to declare the use of the cortex m3 instead of the default m4? Looking at the source file mbed provides on GIT the readme makes me think it should be only necessary to define CORTEX_M3 but it does not seem to work.

Forgot to tell that the firmware works on the 18s37 board but the binary won't make it work

posted by Riccardo Manani 31 May 2017
Be the first to answer this question.