[Testers Needed] Mbed OS Port for Teensy 4.0

Ooh yeah good point about the MAC address! I'll add that to the pull request shortly.

Unfortunately, Mbed OS currently does not support USB host mode in any shape or form. It's a bummer, I know, I don't know why ARM never added it.
 
Ooh yeah good point about the MAC address! I'll add that to the pull request shortly.

Unfortunately, Mbed OS currently does not support USB host mode in any shape or form. It's a bummer, I know, I don't know why ARM never added it.

Thanks for the reply:) It really is a bummer...
 
OK! I added the MAC address code and confirmed that it's reading the OTP MAC addr correctly. I also figured out what's up with the TLS socket example; once this patch is merged it should work correctly. Another one of ARM's dev decisions I just have to scratch my head over...
 
After @PaulStoffregen reminded me about this, as in regards to Arduino GIGA, I thought I would take another attempt at installing it on
Windows and build the Hello app... Maybe I need to clean out and do a total fresh install, as the cmake fails.

I sort of remember something similar when I tried awhile ago:
Code:
D:\github\mbed-ce-hello-world>mkdir build

D:\github\mbed-ce-hello-world>cd build

D:\github\mbed-ce-hello-world\build>cmake .. -GNinja -DCMAKE_BUILD_TYPE=Develop -DMBED_TARGET=TEENSY_40
-- Found Python3: D:/Program Files/Python311/python.exe (found version "3.11.2") found components: Interpreter
-- Checking for Python package intelhex -- found
-- Checking for Python package prettytable -- found
-- Checking for Python package future -- found
-- Checking for Python package jinja2 -- found
-- Checking for Python package mbed_tools -- found
-- Mbed: First CMake run detected, generating configs...
ERROR: Failed to decode JSON data in the file located at 'D:\github\mbed-ce-hello-world\mbed_app.json'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\cli\main.py", line 38, in invoke
    super().invoke(context)
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\cli\configure.py", line 85, in configure
    _, output_path = generate_config(mbed_target, toolchain, program)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\build\config.py", line 36, in generate_config
    config = assemble_config(
             ^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\build\_internal\config\assemble_build_config.py", line 42, in assemble_config
    return _assemble_config_from_sources(target_attributes, mbed_lib_files, mbed_app_file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\build\_internal\config\assemble_build_config.py", line 55, in _assemble_config_from_sources
    app_data = source.from_file(
               ^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\build\_internal\config\source.py", line 23, in from_file
    return prepare(decode_json_file(config_source_file_path), source_name=default_name, target_filters=target_filters)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\lib\json_helpers.py", line 19, in decode_json_file
    return json.loads(path.read_text())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\json\decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 6 column 13 (char 151)
CMake Error at mbed-os/tools/cmake/mbed_generate_configuration.cmake:115 (message):
  mbedtools configure failed! Cannot build this project.  Command was
  D:/Program Files/Python311/python.exe -c import mbed_tools.cli.main;
  exit(mbed_tools.cli.main.cli()) configure -t GCC_ARM -m TEENSY_40
  --mbed-os-path D:/github/mbed-ce-hello-world/mbed-os/tools/cmake/../..
  --output-dir D:/github/mbed-ce-hello-world/build --app-config
  D:/github/mbed-ce-hello-world/mbed_app.json
Call Stack (most recent call first):
  mbed-os/tools/cmake/app.cmake:42 (include)
  CMakeLists.txt:12 (include)


-- Configuring incomplete, errors occurred!

Some of the versions I have installed:
Code:
D:\github\mbed-ce-hello-world\build>cmake --version
cmake version 3.24.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

D:\github\mbed-ce-hello-world\build>ninja --version
1.11.1

D:\github\mbed-ce-hello-world\build>python --version
Python 3.11.2

Running Windows 11. Wondering if anyone has it working with Windows? Or should I try it from my Ubuntu machine? Or WSL prompt?

Thanks
Kurt
 
After @PaulStoffregen reminded me about this, as in regards to Arduino GIGA, I thought I would take another attempt at installing it on
Windows and build the Hello app... Maybe I need to clean out and do a total fresh install, as the cmake fails.

I sort of remember something similar when I tried awhile ago:
Code:
D:\github\mbed-ce-hello-world>mkdir build

D:\github\mbed-ce-hello-world>cd build

D:\github\mbed-ce-hello-world\build>cmake .. -GNinja -DCMAKE_BUILD_TYPE=Develop -DMBED_TARGET=TEENSY_40
-- Found Python3: D:/Program Files/Python311/python.exe (found version "3.11.2") found components: Interpreter
-- Checking for Python package intelhex -- found
-- Checking for Python package prettytable -- found
-- Checking for Python package future -- found
-- Checking for Python package jinja2 -- found
-- Checking for Python package mbed_tools -- found
-- Mbed: First CMake run detected, generating configs...
ERROR: Failed to decode JSON data in the file located at 'D:\github\mbed-ce-hello-world\mbed_app.json'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\cli\main.py", line 38, in invoke
    super().invoke(context)
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\cli\configure.py", line 85, in configure
    _, output_path = generate_config(mbed_target, toolchain, program)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\build\config.py", line 36, in generate_config
    config = assemble_config(
             ^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\build\_internal\config\assemble_build_config.py", line 42, in assemble_config
    return _assemble_config_from_sources(target_attributes, mbed_lib_files, mbed_app_file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\build\_internal\config\assemble_build_config.py", line 55, in _assemble_config_from_sources
    app_data = source.from_file(
               ^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\build\_internal\config\source.py", line 23, in from_file
    return prepare(decode_json_file(config_source_file_path), source_name=default_name, target_filters=target_filters)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\mbed_tools\lib\json_helpers.py", line 19, in decode_json_file
    return json.loads(path.read_text())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\json\decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 6 column 13 (char 151)
CMake Error at mbed-os/tools/cmake/mbed_generate_configuration.cmake:115 (message):
  mbedtools configure failed! Cannot build this project.  Command was
  D:/Program Files/Python311/python.exe -c import mbed_tools.cli.main;
  exit(mbed_tools.cli.main.cli()) configure -t GCC_ARM -m TEENSY_40
  --mbed-os-path D:/github/mbed-ce-hello-world/mbed-os/tools/cmake/../..
  --output-dir D:/github/mbed-ce-hello-world/build --app-config
  D:/github/mbed-ce-hello-world/mbed_app.json
Call Stack (most recent call first):
  mbed-os/tools/cmake/app.cmake:42 (include)
  CMakeLists.txt:12 (include)


-- Configuring incomplete, errors occurred!

Some of the versions I have installed:
Code:
D:\github\mbed-ce-hello-world\build>cmake --version
cmake version 3.24.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

D:\github\mbed-ce-hello-world\build>ninja --version
1.11.1

D:\github\mbed-ce-hello-world\build>python --version
Python 3.11.2

Running Windows 11. Wondering if anyone has it working with Windows? Or should I try it from my Ubuntu machine? Or WSL prompt?

Thanks
Kurt
Hi @KurtE,
I definitely had it working with Ubuntu 22.04 and it seems to me that I had finally got it to work with W11. I have not been in W11 for a while but I will check and see if Mbed CE is still installed. Hopefully I wrote down the procedure for installing it in windows like I did in Linux. Just can't remember right now. Here in North Washington state it's 8 degrees with a wind chill of -11. Headed for bed to get warm🥶
Will login to W11 tomorrow to check for Mbed CE...
 
Thanks,

Ditto it is about that cold here too... Just got up and restarted fireplace...
I'm in Windows right now and I did have Mbed CE setup. I cannot find any setup info about how I did it:( Have to check and see if it was actually working. I think I used the procedure I posted (P#40) for Ubuntu and modified it using this and:
Code:
# Mbed CE Hello World
This project implements a basic hello world using Mbed OS Community Edition.  Use it as an example or a starting place for your own projects!

## How to set up this project:

1. Clone it to your machine.  Don't forget to use `--recursive` to clone the submodules: `git clone --recursive https://github.com/mbed-ce/mbed-ce-hello-world.git`
2. Set up the GNU ARM toolchain (and other programs) on your machine using [the toolchain setup guide](https://github.com/mbed-ce/mbed-os/wiki/Toolchain-Setup-Guide).
3. Set up the CMake project for editing.  We have three ways to do this:
    - On the [command line](https://github.com/mbed-ce/mbed-os/wiki/Project-Setup:-Command-Line)
    - Using the [CLion IDE](https://github.com/mbed-ce/mbed-os/wiki/Project-Setup:-CLion)
    - Using the [VS Code IDE](https://github.com/mbed-ce/mbed-os/wiki/Project-Setup:-VS-Code)
4. Build the `flash-HelloWorld` target to upload the code to a connected device.

I'll let you know if I find more info...
 
I got a bit farther... I deleted the old hello world, recloned it recursively... Maybe problem with previous clone...
The cmake appeared to go through: But ninja failed.

Code:
D:\github>git clone https://github.com/mbed-ce/mbed-ce-hello-world.git --recursive
Cloning into 'mbed-ce-hello-world'...
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 32 (delta 11), reused 29 (delta 8), pack-reused 0
Receiving objects: 100% (32/32), 4.62 KiB | 4.62 MiB/s, done.
Resolving deltas: 100% (11/11), done.
Submodule 'mbed-os' (https://github.com/mbed-ce/mbed-os.git) registered for path 'mbed-os'
Cloning into 'D:/github/mbed-ce-hello-world/mbed-os'...
remote: Enumerating objects: 129396, done.
remote: Counting objects: 100% (129396/129396), done.
remote: Compressing objects: 100% (58204/58204), done.
remote: Total 129396 (delta 79940), reused 109662 (delta 65136), pack-reused 0
Receiving objects: 100% (129396/129396), 348.00 MiB | 813.00 KiB/s, done.
Resolving deltas: 100% (79940/79940), done.
remote: Enumerating objects: 377158, done.
remote: Counting objects: 100% (338845/338845), done.
remote: Compressing objects: 100% (91379/91379), done.
remote: Total 323656 (delta 232635), reused 311517 (delta 221581), pack-reused 0
Receiving objects: 100% (323656/323656), 305.90 MiB | 620.00 KiB/s, done.

Resolving deltas: 100% (232635/232635), completed with 7789 local objects.
From https://github.com/mbed-ce/mbed-os
 * branch                  7c61babb10e2d3d84dbfcc39d4314b64d7d808ce -> FETCH_HEAD
Submodule path 'mbed-os': checked out '7c61babb10e2d3d84dbfcc39d4314b64d7d808ce'
Submodule 'doxygen-awesome-css' (https://github.com/jothepro/doxygen-awesome-css.git) registered for path 'mbed-os/tools/doxygen-awesome-css'
Cloning into 'D:/github/mbed-ce-hello-world/mbed-os/tools/doxygen-awesome-css'...
remote: Enumerating objects: 2503, done.
remote: Counting objects: 100% (314/314), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 2503 (delta 284), reused 259 (delta 259), pack-reused 2189
Receiving objects: 100% (2503/2503), 8.02 MiB | 1.08 MiB/s, done.
Resolving deltas: 100% (1913/1913), done.
Submodule path 'mbed-os/tools/doxygen-awesome-css': checked out 'a3c119b4797be2039761ec1fa0731f038e3026f6'

D:\github>cd mbed-ce-hello-world

D:\github\mbed-ce-hello-world>mkdir build

D:\github\mbed-ce-hello-world>cd build

D:\github\mbed-ce-hello-world\build>cmake .. -GNinja -DCMAKE_BUILD_TYPE=Develop -DMBED_TARGET=TEENSY_40
-- Found Python3: D:/Program Files/Python311/python.exe (found version "3.11.2") found components: Interpreter
-- Checking for Python package intelhex -- found
-- Checking for Python package prettytable -- found
-- Checking for Python package future -- found
-- Checking for Python package jinja2 -- found
-- Mbed: First CMake run detected, generating configs...
mbed_config.cmake has been generated and written to 'D:\github\mbed-ce-hello-world\build\mbed_config.cmake'
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- The ASM compiler identification is GNU
-- Found assembler: D:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/arm-none-eabi-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/arm-none-eabi-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/arm-none-eabi-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Mbed: Target does not have any upload method configuration.  'make flash-' commands will not be available unless configured by the upper-level project.
-- Mbed: Not building any Mbed OS tests.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/github/mbed-ce-hello-world/build

D:\github\mbed-ce-hello-world\build>ninja
[1/251] Generating ../mbed-teensy-40.link_script.ld
Preprocess linker script: MIMXRT1052xxxxx.ld -> mbed-teensy-40.link_script.ld
[8/251] Building C object mbed-os/CMakeFiles/mbed-os.dir/t...sso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c.obj
FAILED: mbed-os/CMakeFiles/mbed-os.dir/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c.obj
D:\ccache-4.7.4-windows-i686\ccache.exe "D:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\13.2 Rel1\bin\arm-none-eabi-gcc.exe" @mbed-os\CMakeFiles\mbed-os.dir\targets\TARGET_NXP\TARGET_MCUXpresso_MCUS\TARGET_MIMXRT105x\TARGET_TEENSY_4X\bootdata.c.obj.rsp -MD -MT mbed-os/CMakeFiles/mbed-os.dir/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c.obj -MF mbed-os\CMakeFiles\mbed-os.dir\targets\TARGET_NXP\TARGET_MCUXpresso_MCUS\TARGET_MIMXRT105x\TARGET_TEENSY_4X\bootdata.c.obj.d -o mbed-os/CMakeFiles/mbed-os.dir/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c.obj -c D:/github/mbed-ce-hello-world/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c
D:/github/mbed-ce-hello-world/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c:43:10: fatal error: mimxrt_flash_info.h: No such file or directory
   43 | #include <mimxrt_flash_info.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[18/251] Building CXX object mbed-os/drivers/usb/CMakeFiles/mbed-usb.dir/source/USBDevice.cpp.obj
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp: In member function 'void USBDevice::_complete_set_configuration()':
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp:405:15: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct USBDevice::endpoint_info_t'; use assignment or value-initialization instead [-Wclass-memaccess]
  405 |         memset(_endpoint_info, 0, sizeof(_endpoint_info));
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp:21:
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/include/usb/internal/USBDevice.h:550:12: note: 'struct USBDevice::endpoint_info_t' declared here
  550 |     struct endpoint_info_t {
      |            ^~~~~~~~~~~~~~~
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp: In constructor 'USBDevice::USBDevice(USBPhy*, uint16_t, uint16_t, uint16_t)':
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp:1351:11: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct USBDevice::endpoint_info_t'; use assignment or value-initialization instead [-Wclass-memaccess]
 1351 |     memset(_endpoint_info, 0, sizeof(_endpoint_info));
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/include/usb/internal/USBDevice.h:550:12: note: 'struct USBDevice::endpoint_info_t' declared here
  550 |     struct endpoint_info_t {
      |            ^~~~~~~~~~~~~~~
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp: In member function 'void USBDevice::_change_state(DeviceState)':
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp:1757:15: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct USBDevice::endpoint_info_t'; use assignment or value-initialization instead [-Wclass-memaccess]
 1757 |         memset(_endpoint_info, 0, sizeof(_endpoint_info));
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/include/usb/internal/USBDevice.h:550:12: note: 'struct USBDevice::endpoint_info_t' declared here
  550 |     struct endpoint_info_t {
      |            ^~~~~~~~~~~~~~~
[29/251] Building CXX object CMakeFiles/HelloWorld.dir/main.cpp.obj
ninja: build stopped: subcommand failed.

D:\github\mbed-ce-hello-world\build>
It could not find: 43 | #include <mimxrt_flash_info.h>

EDIT: looks like that line changed 4 months ago:
1705160749363.png


EDIT2: created new issue https://github.com/mbed-ce/mbed-os/issues/207

EDIT3: changing the include file to: mimxrt_memory_info.h
And it now builds... Now to dig out a T40 and see if it runs.
 
Last edited:
I got a bit farther... I deleted the old hello world, recloned it recursively... Maybe problem with previous clone...
The cmake appeared to go through: But ninja failed.

Code:
D:\github>git clone https://github.com/mbed-ce/mbed-ce-hello-world.git --recursive
Cloning into 'mbed-ce-hello-world'...
remote: Enumerating objects: 32, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 32 (delta 11), reused 29 (delta 8), pack-reused 0
Receiving objects: 100% (32/32), 4.62 KiB | 4.62 MiB/s, done.
Resolving deltas: 100% (11/11), done.
Submodule 'mbed-os' (https://github.com/mbed-ce/mbed-os.git) registered for path 'mbed-os'
Cloning into 'D:/github/mbed-ce-hello-world/mbed-os'...
remote: Enumerating objects: 129396, done.
remote: Counting objects: 100% (129396/129396), done.
remote: Compressing objects: 100% (58204/58204), done.
remote: Total 129396 (delta 79940), reused 109662 (delta 65136), pack-reused 0
Receiving objects: 100% (129396/129396), 348.00 MiB | 813.00 KiB/s, done.
Resolving deltas: 100% (79940/79940), done.
remote: Enumerating objects: 377158, done.
remote: Counting objects: 100% (338845/338845), done.
remote: Compressing objects: 100% (91379/91379), done.
remote: Total 323656 (delta 232635), reused 311517 (delta 221581), pack-reused 0
Receiving objects: 100% (323656/323656), 305.90 MiB | 620.00 KiB/s, done.

Resolving deltas: 100% (232635/232635), completed with 7789 local objects.
From https://github.com/mbed-ce/mbed-os
 * branch                  7c61babb10e2d3d84dbfcc39d4314b64d7d808ce -> FETCH_HEAD
Submodule path 'mbed-os': checked out '7c61babb10e2d3d84dbfcc39d4314b64d7d808ce'
Submodule 'doxygen-awesome-css' (https://github.com/jothepro/doxygen-awesome-css.git) registered for path 'mbed-os/tools/doxygen-awesome-css'
Cloning into 'D:/github/mbed-ce-hello-world/mbed-os/tools/doxygen-awesome-css'...
remote: Enumerating objects: 2503, done.
remote: Counting objects: 100% (314/314), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 2503 (delta 284), reused 259 (delta 259), pack-reused 2189
Receiving objects: 100% (2503/2503), 8.02 MiB | 1.08 MiB/s, done.
Resolving deltas: 100% (1913/1913), done.
Submodule path 'mbed-os/tools/doxygen-awesome-css': checked out 'a3c119b4797be2039761ec1fa0731f038e3026f6'

D:\github>cd mbed-ce-hello-world

D:\github\mbed-ce-hello-world>mkdir build

D:\github\mbed-ce-hello-world>cd build

D:\github\mbed-ce-hello-world\build>cmake .. -GNinja -DCMAKE_BUILD_TYPE=Develop -DMBED_TARGET=TEENSY_40
-- Found Python3: D:/Program Files/Python311/python.exe (found version "3.11.2") found components: Interpreter
-- Checking for Python package intelhex -- found
-- Checking for Python package prettytable -- found
-- Checking for Python package future -- found
-- Checking for Python package jinja2 -- found
-- Mbed: First CMake run detected, generating configs...
mbed_config.cmake has been generated and written to 'D:\github\mbed-ce-hello-world\build\mbed_config.cmake'
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- The ASM compiler identification is GNU
-- Found assembler: D:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/arm-none-eabi-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/arm-none-eabi-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/13.2 Rel1/bin/arm-none-eabi-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Mbed: Target does not have any upload method configuration.  'make flash-' commands will not be available unless configured by the upper-level project.
-- Mbed: Not building any Mbed OS tests.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/github/mbed-ce-hello-world/build

D:\github\mbed-ce-hello-world\build>ninja
[1/251] Generating ../mbed-teensy-40.link_script.ld
Preprocess linker script: MIMXRT1052xxxxx.ld -> mbed-teensy-40.link_script.ld
[8/251] Building C object mbed-os/CMakeFiles/mbed-os.dir/t...sso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c.obj
FAILED: mbed-os/CMakeFiles/mbed-os.dir/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c.obj
D:\ccache-4.7.4-windows-i686\ccache.exe "D:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\13.2 Rel1\bin\arm-none-eabi-gcc.exe" @mbed-os\CMakeFiles\mbed-os.dir\targets\TARGET_NXP\TARGET_MCUXpresso_MCUS\TARGET_MIMXRT105x\TARGET_TEENSY_4X\bootdata.c.obj.rsp -MD -MT mbed-os/CMakeFiles/mbed-os.dir/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c.obj -MF mbed-os\CMakeFiles\mbed-os.dir\targets\TARGET_NXP\TARGET_MCUXpresso_MCUS\TARGET_MIMXRT105x\TARGET_TEENSY_4X\bootdata.c.obj.d -o mbed-os/CMakeFiles/mbed-os.dir/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c.obj -c D:/github/mbed-ce-hello-world/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c
D:/github/mbed-ce-hello-world/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_TEENSY_4X/bootdata.c:43:10: fatal error: mimxrt_flash_info.h: No such file or directory
   43 | #include <mimxrt_flash_info.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[18/251] Building CXX object mbed-os/drivers/usb/CMakeFiles/mbed-usb.dir/source/USBDevice.cpp.obj
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp: In member function 'void USBDevice::_complete_set_configuration()':
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp:405:15: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct USBDevice::endpoint_info_t'; use assignment or value-initialization instead [-Wclass-memaccess]
  405 |         memset(_endpoint_info, 0, sizeof(_endpoint_info));
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp:21:
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/include/usb/internal/USBDevice.h:550:12: note: 'struct USBDevice::endpoint_info_t' declared here
  550 |     struct endpoint_info_t {
      |            ^~~~~~~~~~~~~~~
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp: In constructor 'USBDevice::USBDevice(USBPhy*, uint16_t, uint16_t, uint16_t)':
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp:1351:11: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct USBDevice::endpoint_info_t'; use assignment or value-initialization instead [-Wclass-memaccess]
 1351 |     memset(_endpoint_info, 0, sizeof(_endpoint_info));
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/include/usb/internal/USBDevice.h:550:12: note: 'struct USBDevice::endpoint_info_t' declared here
  550 |     struct endpoint_info_t {
      |            ^~~~~~~~~~~~~~~
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp: In member function 'void USBDevice::_change_state(DeviceState)':
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/source/USBDevice.cpp:1757:15: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct USBDevice::endpoint_info_t'; use assignment or value-initialization instead [-Wclass-memaccess]
 1757 |         memset(_endpoint_info, 0, sizeof(_endpoint_info));
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/github/mbed-ce-hello-world/mbed-os/drivers/usb/include/usb/internal/USBDevice.h:550:12: note: 'struct USBDevice::endpoint_info_t' declared here
  550 |     struct endpoint_info_t {
      |            ^~~~~~~~~~~~~~~
[29/251] Building CXX object CMakeFiles/HelloWorld.dir/main.cpp.obj
ninja: build stopped: subcommand failed.

D:\github\mbed-ce-hello-world\build>
It could not find: 43 | #include <mimxrt_flash_info.h>

EDIT: looks like that line changed 4 months ago:
View attachment 32902

EDIT2: created new issue https://github.com/mbed-ce/mbed-os/issues/207

EDIT3: changing the include file to: mimxrt_memory_info.h
And it now builds... Now to dig out a T40 and see if it runs.
Got the same error here as well under Ubuntu. Will fix and test on this side...
Edit: Just noticed a T4.1 target as well.
Edit2: Working on the PJRC T4.0 development board. Now to try the T4.1 branch.
Edit3: Just confirmed that the T4.1 branch is working as well:D
 
Last edited:
Back
Top