8 years, 5 months ago.

MBED:defining PIN NAMES map

Hi all MBED gurus, my project uses the MCU empowering the FRDM-KL46Z but does not use the board. I'd like to know the process involved in making this custom device compatible with MBED . I have seen while compiling that many constructors use PIN NAMES defined in one dedicated header file. I guess that I will be obliged to create one such mapping file. What are the others requirements for making my device MBED compatible? MBED may provide me most of the drivers & I don't have the time to develop many drivers.

Thanks for your help & guidance Kind regards

2 Answers

8 years, 5 months ago.

In addition to Paul's post: If you use exactly the same MCU, there is nothing you need to define yourself, you can just use the standard KL46 board for compilations. If you for example have buttons on your board, and you want to have different names for them, just make an extra file, board.h for example, and include that wherever you need it. Then in that file add stuff like #define BUTTON_1 PTE19

Accepted Answer

Thanks again to Erik & Paul for these valuable answers.I ''ll be back -) Thanks again

posted by jerome moliere 13 Dec 2015
8 years, 5 months ago.

All the pins are defined in the PerpheralPins.c file (or at least they should be).

You can develop your code using the FRDM-KL46Z board, then use this to program your prototype home made board via the SWD connections. Drag and Drop programming is the same when connecting an external MCU. Check the PeripheralPins.c file for all the 'legal' pin functions, i2c, SPI for instance. There may be more pin combinations available that are on the FRDM board that you can use on you prototype board.