LPC2138 getting started

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

LPC2138 getting started

2,976 Views
andreacerfoglia
Contributor II

hi, 

im having trouble programming an LPC2138 and setting up the IDE.

actually i have downloaded LPCespresso, and i have just seen the MCUespresso IDE, what are the differences?

other than those two, do you have any other IDE to worth considering?

this is my first attempt programming an ARM CPU, so what are the first steps? like setting up PLL and things like that, or that is not done in runtime?

also, the LPC2138 has already a bootloader installed, this mean that the clock is already set up?

while i read the IDE user guide, do you know any other helpful lecture?

thanks in advance

Labels (1)
8 Replies

1,937 Views
anthony_bailey
Contributor I

Does anyone know if the PE Micro Universal Fx POD working with a LPC2138 and which software to use? I know MCUXpresso works with the POD but doesn't support the LPC2138. Does anyone know if LPCXpresso working with the PE Micro POD?

0 Kudos

1,937 Views
andreacerfoglia
Contributor II

@Con Verse: thanks for the link, very useful,  thanks to it i finally enabled the hex making, but i have problem with the CRC of the hex file.

those are the post build steps:

arm-none-eabi-size "${BuildArtifactFileName}"
arm-none-eabi-objcopy -v -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin"
checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"
arm-none-eabi-objcopy -v -O hex "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.hex"

the first line i think it calculate the program size

the second one create a binary file, because its possible to do the checksum only on bin files (right?)

thee third one add the CRC to the bin

and the fourth one convert the bin (with the CRC) to hex

or at least, this is what i want to do, what im doing wrong?

there is a way for me to calculate the CRC and then check it against the hex file?

@arun singh: your site is nice, thanks, ill use it as a reference once im able to load something on the board

EDIT

i found out this page: Intel HEX - Wikipedia 

basically hex is plain ASCII and i can read it with notepad++, but i cant find anywhere the CRC calculated in the build console

EDIT2

F*#%!

i just watched closely the post build consol, i was converting to hex the original axf file, the one whitout the CRC.

now i add the CRC directly to te axf file and then i convert it to hex, but nothing.

i have downloaded flash magic, and it seems to work without the CRC, maybe he calculate it by himself?

0 Kudos

1,937 Views
arunsingh
Contributor I

I would recommend Keil. It's easy to use and can also be used for other microcontrollers for eg- ARM M4 series.

Regarding getting started, you can visit the following link-

http://controllerstech.blogspot.in/

0 Kudos

1,937 Views
andreacerfoglia
Contributor II

thanks for the reply.

unfortunatley the LPC2138 its not my choice, but is part of a industrial grade board, already certified for whatever has to.

 ill probably get a debugger once i can get started on programming the board.

it exist a hello word program for te LPC2138? or some kind of reference to the various libraries used on the device.

0 Kudos

1,937 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Andrea,

You could find the “Sample Code Bundle for LPC213X and LPC214X Peripheral” (RealView and Keil) on “Lab and Test Software” segment of the following link:

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-cortex-m-mcus/lpc2100...


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,937 Views
andreacerfoglia
Contributor II

@CarlosCasillas thanks a lot, those library and example are a big step further.

i'm (finally) trying to program the board, hoping that the program works, but i cant compile a hex file, which is accepted by the board developer loading program. how can i produce one?

 

also, after a bit of googling, it looks like that the axf file produced after the project building is created for "intel" machines. im wrong here? otherwhise how can i change the build options?

0 Kudos

1,937 Views
converse
Senior Contributor V

The meaning of axf file is Arm eXecutable File - so it is not for Intel.

if you are using Lpcxpresso or Mcuxpresso, (it is the same), you can create hex file as described here

MCUXpresso IDE: S-Record, Intel Hex and Binary Files .

0 Kudos

1,937 Views
lpcxpresso_supp
NXP Employee
NXP Employee

First of all - if you are starting a new development now, I would strongly recommend that you consider using a Cortex-M based MCU - such as the LPC8xx, LPC1xxx, LPC4xxx or LPC54xxx (or a Kinetis MCU) - rather than the olde ARM7 based MCUs in the LPC2xxx family.

That aside, from an IDE viewpoint : MCUXpresso IDE only support development for ARM Cortex-M based MCUs, not the older LPC2xxx parts which are based on older ARM7 cpus.

But if you want to develop for LPC2000, then if you use LPCXpresso IDE (rather than a third party IDE - such as Keil's) then you really need to obtain an LPC-Link (or Red Probe) debug probe : Which debug probes are supported by LPCXpresso IDE with which MCUs? 

Regards,

LPCXpresso Support

0 Kudos