Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Run mbed-os on Teensy 4.0?

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    5

    Run mbed-os on Teensy 4.0?

    I was wondering whether there's any relatively easy way to run mbed-os on the new Teensy 4.0. As far as I can tell the MCU itself should be supported after all.

    I've been playing around with custom targets without any luck so far. If someone has already done this I'd be very happy to get some guidance.

    Thanks

  2. #2
    Junior Member
    Join Date
    Oct 2019
    Posts
    5
    Replying to myself.. so, I'm able to compile and flash a HEX file. I've no idea whether what I'm uploading to the teensy is actually executable, though. Next step would be to upload a simple blinky example. For that I probably have to figure out the correct PinNames.h for this board.

    So far I've got a custom target targeting the Cortex-M7FD core (I'm assuming the FD stands for floating point double precision?)

    Anyway, this is my custom_targets.json. I suppose a lot of the stuff defined in here is still wrong, but one step at a time...

    Code:
    {
        "TEENSY4_0": {
            "inherits": ["Target"],
            "core": "Cortex-M7FD",
            "supported_toolchains": ["ARM", "GCC_ARM"],
            "extra_labels": ["NXP", "MCUXpresso_MCUS", "EVK", "MIMXRT1050", "IMX", "NXP_EMAC"],
            "is_disk_virtual": true,
            "macros": [
                "CPU_MIMXRT1052DVL6B",
                "FSL_RTOS_MBED",
                "XIP_BOOT_HEADER_ENABLE=1",
                "XIP_EXTERNAL_FLASH=1",
                "XIP_BOOT_HEADER_DCD_ENABLE=1",
                "SKIP_SYSCLK_INIT",
                "FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE",
                "MBED_MPU_CUSTOM",
                "MBED_TICKLESS"
            ],
            "post_binary_hook": {
                "function": "TEENSY3_1Code.binary_hook",
                "toolchains": ["ARM_STD", "ARM_MICRO", "GCC_ARM"]
            },
            "detect_code": ["0270"],
            "device_has": [
                "RTC",
                "SLEEP",
                "USTICKER",
                "LPTICKER",
                "ANALOGIN",
                "EMAC",
                "I2C",
                "I2CSLAVE",
                "ERROR_RED",
                "INTERRUPTIN",
                "PORTIN",
                "PORTINOUT",
                "PORTOUT",
                "PWMOUT",
                "SERIAL",
                "SPI",
                "SPISLAVE",
                "STDIO_MESSAGES",
                "TRNG"
            ],
            "OUTPUT_EXT": "hex",
            "release_versions": ["2", "5"],
            "device_name": "MIMXRT1062xxxxA"
        }
    }
    If I make any further progress I'll be documenting it in here. And if anyone wants to point out some obvious errors, please go ahead, as I don't really know what I'm doing.

  3. #3
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,231
    I don't know if building for 1050 will work with T4 which is a 1060. I did pre-beta evaluation using mbed and NXP 1050 eval board. mbed compiler didn't support NXP 1060 eval board, so I had to use NXP's MCUXpresso IDE for testing 1060.

  4. #4
    Junior Member
    Join Date
    Oct 2019
    Posts
    5
    Oh, you're right! It's supposed to target the 1060, I didn't catch that. I'll be looking into this, thanks for pointing this out!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •