Beruflich Dokumente
Kultur Dokumente
4
Table of Contents
Configuring MCUXpresso.........................................................................................................................1
Using MCUXpresso...................................................................................................................................1
A working example with Usb serial..................................................................................................1
Setting the Led Pin on Teensy 4.......................................................................................................4
Problems with MCUXpresso.....................................................................................................................6
Using Teensyduino.....................................................................................................................................7
Resources...................................................................................................................................................7
Configuring MCUXpresso
• Dowload IDE (account required): https://www.nxp.com/design/software/development-
software/mcuxpresso-software-and-tools/mcuxpresso-integrated-development-environment-
ide:MCUXpresso-IDE
• Open IDE
• Select Install SDK
• Select Processors tab
• Search for MIMXRT1062, Teensy4 is MIMXRT1062DVL6A
Using MCUXpresso
A working example with Usb serial
The only way to get a project with serial usb it is to export the hello_world_virtual_com example.
There is also a FreeRTOS version called “cdc_vcom_freertos”. These are the steps
1. select import example
2. Select the correct board/processor
3. choose hello_world_virtual_com
4. modify post build options to generate a hex file, right click current project → properties → C++
build → Settings → Build steps tab → post build → edit button. Add this line arm-none-eabi-
objcopy -v -O ihex "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.hex"
5. Build the project
6. On Project folder there is a “Debug” folder, inside it you can find the hex file.
7. Use the teensy loader to load this file by selecting It (you can open the teensy loader with
arduino).
8. Click the reboot or programming button in Teensy
9. The example echoes back text through terminal
Now you can set the pin to HIGH: GPIO_PinWrite(GPIO2, 3U, 1);
or to LOW: GPIO_PinWrite(GPIO2, 3U, 0);
Although legally speaking if a client explicitly ask for it, we might need to give them the binaries to be
able to change the Arduino parts, but never our source code. However this is very unlikely to happen,
since It would not make any sense for a customer to do this
The LGPL does, however, require you to make available object files that allow for the
relinking of the firmware against updated versions of the Arduino core and libraries.
Source: https://www.arduino.cc/en/main/FAQ#toc10
The teensy libraries use MIT license, so it is fine to use them, even you can modify them. Paul from
teensy mentions this many times on the forum, like in here
So in conclusion, it should be fine to go with teensyduino, this does not apply for 3rd arduino libraries,
but we do not use any.
Resources
Processor reference: https://www.pjrc.com/teensy/IMXRT1060RM_rev2.pdf
Teensy schematics: https://www.pjrc.com/teensy/schematic.html
MCUXpresso SDK api description: https://mcuxpresso.nxp.com/api_doc/dev/1414/index.html
Forum conversation: https://forum.pjrc.com/threads/53662-Teensy-4-RTOS and
https://forum.pjrc.com/threads/57568-Teensy-4-compatible-hex-files-using-MCUXpresso-IDE?
highlight=mcuxpresso
Example project using teensy 3.5 on MCUXpresso:
https://github.com/sceaj/teensy35_virtualcom/blob/master/source/virtualcom.c