10 years, 5 months ago.

How to change the mbed-src to new customer board

Hi,

I have a new customer board. And I want to try to use mbed compiler and most of their API/function (I hope) to program it. But the ciruit board connection is a lot different (pin etc), so could I ask which kind of file in mbed-src should I change to adjust new board?

Yiqing

Question relating to:

1 Answer

10 years, 5 months ago.

You can always program using the 'real' pinnames. For example on the LPC1768 you can address port 0, pin 5, as P0_5. You can also always include your own header file where you define extra pinnames, for example:

#define Pin10 P0_5

And finally to really answer your question, pinnames are defined in: /targets/hal/[manufacturer]/[model]/PinNames.h

Accepted Answer

Could I ask where is device.h, I did not find it in the folder

posted by Yiqing Liang 17 Oct 2013

Device.h should be in the same folder. One of them has it in a sub-folder, but all others it should be in the same folder as PinNames.h.

posted by Erik - 17 Oct 2013

Could I ask how to use mbed code to upload the program to my custom board through JTAG? Do I need sth such as Flash magic? Do I need to covert .bin to some other format? Is there any tutorial to do that?

posted by Yiqing Liang 08 Nov 2013

It probably depends on what you use to control the JTAG programmer, that program probably either accepts bin or hex files.

posted by Erik - 08 Nov 2013