I dragged out my KL25Z board, installed MCUXpresso, and fired up the frdmkl25z_driver_examples_gpio_led_output ("blink") example...
I didn't know about MCUXpresso, thank you, downloaded, will give it a try. So far I've only used their "CodeWarrior" IDE which was left on a Windows laptop from about 5-10 years ago, when I first tried the FRDM-KL25Z devboard.
Recently (couple of weeks ago) I've tried the GCC ARM compiler on Linux, and updated a git demo to compile with current version (
arm-none-eabi-gcc --version returns "arm-none-eabi-gcc (15:9-2019-q4-0ubuntu1) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] Copyright (C) 2019 Free Software Foundation, Inc.")
To install the GCC ARM compiler, I did:
sudo apt install gcc-arm-none-eabi
and to grant user access to the devboard (add the current user to the dialout group, so to have access to the serial ports, /dev/ttyACMx is USB serial port used by the devboard):
sudo usermod -a -G dialout my_linux_username
The GCC ARM does not have any specific files for the Freescale devboard, so I forked from github two projects meant for this FRDM-KL25Z devboard I happen to have (projects payne92/bare-metal-arm and 1nv1/OpenKL25Z). These are projects for the FRDM-KL25Z devboard, just that they are from many years ago. The last one even has ADC readings implemented, which was particularly tempting (the ADC has 16 bits instead of the usual 10 bits in other MCUs).
However, the second example project (the one with the ADC) also has some multitasking features, or an incipient RTOS, which made it hard to understand (for me, not a software dev).
And such came the idea of starting from scratch, where after a couple of days of reading and tries I failed gloriously, so thought of asking in the hope somebody would say "it's not you, it's the MCU".
The two git projs I'm talking (updated to compile with current GCC) are
https://github.com/RoGeorge/bare-metal-armhttps://github.com/RoGeorge/OpenKL25ZTo compile and run the second one (with ADC):
sudo apt install screen git
git clone https://github.com/RoGeorge/OpenKL25Z
cd OpenKL25Z
make clean DEFS=-DDEBUG_MODE deploy
screen /dev/ttyACM0 115200
# touch the capacitive slider to display ADC readings
I haven't uploaded on github any of my attempts of starting from scratch (instead of starting from one of the above already working git examples), because I don't have yet any that works. Made a couple of failed attempts, then got stuck/overwhelmed by the docs. Kilo-pages of docs like these:
https://spivey.oriel.ox.ac.uk/dswiki/images-digisys/5/56/KL25-refman.pdfhttps://www.nxp.com/docs/en/reference-manual/KSDK20APIRM.pdf