4 years ago.

How can i port 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?

  1. include "mbed.h"
  2. include "LPC43xx.h"
  3. define CORTEX_M3
  4. define CORE_M3

DigitalOut myled(LED1);

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

Be the first to answer this question.