Help getting started

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

Help getting started

1,346 Views
mditto1
Contributor III

Hi, I'm struggling to get started with MCUXpresso on a custom LPC55S66 board.

Approach A - copy a sample:

I can create a project from one of the SDK samples and build it and run it on the LPCXpressoLPC55S69 EVK.  But when I change the MCU from 55S69 to 55S66, it no longer builds:

  cannot find libcr_nohost_nf.a

  cannot find libcr_c.a

  cannot find libcr_eabihelpers.a

These libraries are being requested by the generated file Debug/*Debug_library.ld but I don't know where they are supposed to be found.

Approach B - start from scratch:

I created an LPC55S66-specific SDK on the NXP web site and added it to the IDE.

I created a new C project from scratch, specifying MCU LPC55S66, baremetal, nohost, UART console, including USART driver.

I used the pins tool to enable pins 92 and 94 as RXD and TXD.

I used the clocks tool to make the clocks look like the above sample project that works on the EVK.  (My board also uses a 16MHz crystal.)

I didn't make any changes to the code, just compiled the default provided main function that does printf("Hello World\n");  It builds!  and downloads!  and runs!  I can step across the BOARD_Init* functions and the printf, and the infinite loop.  But there is no output on the UART.

I know the board itself works (at least the LED and UART TX and RX) because I can build and run a simple project given to me by our hardware engineer on this board.  But my quest is to learn how to use the IDE so I can start doing things like create a board definition and work on real projects.

Any suggestions how to debug either of these approaches and which one to pursue?  Is there a better "hello world" sample that I should start with?  I have many years experience with embedded C development but the IDE development style leaves me completely bewildered.

Thanks in advance,

Mike

Labels (1)
Tags (2)
0 Kudos
3 Replies

1,186 Views
mditto1
Contributor III

I made some progress, I can use the USART driver to send on the serial port and the GPIO driver to control the LED.  printf still doesn't work (in non-semihost mode), though.  I can live without printf for now.  Now my main challenge is USB and I still have the same basic dilemma - I can't get the SDK example project to build for LPC55s66, nor can I copy the essential code out from that example and merge it into my existing LPC55s66 project.

0 Kudos

1,186 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello mditto@grayshift.com‌,

If you use the same SDK from the LPC55s69 for the LPC55s66 is basically the same, you only would need to modify the RAM and Flash memory regions to match the ones for the LPC55s66:

pastedImage_1.png

You should be able to use the same USB examples if you modify the memory map. I find strange that the printf doesn't work and if you're using the same configurations as the examples and the LPCXpresso board this should work normally, have you try to check the communication with an analyzer or an oscilloscope the see the USART signal?

Best Regards,

Alexis Andalon

1,186 Views
mditto1
Contributor III

Thank you, I was able to modify the memory map in the example project and run it on our board.  The memory config editor wouldn't let me modify the flash size, I had to edit the .cproject file and restart the IDE, but then it worked.

This lets me make some progress testing our board.  I'll ask further questions in my https://community.nxp.com/thread/531443 thread.

Thanks!

0 Kudos