Open FFY00 opened 5 years ago
I didn't work on this repo since I create it and I don't know if I have a teensy 3.2 at home. But I can try ...
Can you send me your cross file compilation ? Do you have a repo with all your project ?
I'll send the cross file when I get home. I am just trying to build a simple arduino program, the project shouldn't matter. I can send it if you want but if you try to build https://github.com/leroilion/teensy-blink it should have the same behavior.
Here's my teensy-32-cross.txt
.
[binaries]
c = 'arm-none-eabi-gcc'
cpp = 'arm-none-eabi-g++'
ar = 'arm-none-eabi-ar'
strip = 'arm-none-eabi-strip'
objcopy = 'arm-none-eabi-objcopy'
[host_machine]
system = 'bare-metal'
cpu_family = 'arm'
cpu = 'cortex-m4'
endian = 'little'
[properties]
teensy_mcu = 'mk20dx256'
teensy_ldscript = 'teensy3/mk20dx256.ld'
c_args = [
'-DF_CPU=72000000',
'-DUSB_SERIAL',
'-DLAYOUT_US_ENGLISH',
'-mthumb',
'-ffunction-sections',
'-fdata-sections',
'-nostdlib',
'-DTEENSYDUINO=138',
'-D__MK20DX256__',
'-DARDUINO=10804',
'-mcpu=cortex-m4',
'-mfloat-abi=hard',
'-mfpu=fpv4-sp-d16'
]
cpp_args = [
'-DF_CPU=72000000',
'-DUSB_SERIAL',
'-DLAYOUT_US_ENGLISH',
'-mthumb',
'-ffunction-sections',
'-fdata-sections',
'-nostdlib',
'-DTEENSYDUINO=138',
'-D__MK20DX256__',
'-DARDUINO=10804',
'-mcpu=cortex-m4',
'-mfloat-abi=hard',
'-mfpu=fpv4-sp-d16',
'-std=gnu++11',
'-felide-constructors',
'-fno-exceptions',
'-fno-rtti'
]
c_link_args = [
'-Os',
'-Wl,--gc-sections',
'-mthumb',
'-mcpu=cortex-m4',
'-mfloat-abi=hard',
'-mfpu=fpv4-sp-d16'
]
cpp_link_args = [
'-Os',
'-Wl,--gc-sections',
'-mthumb',
'-mcpu=cortex-m4',
'-mfloat-abi=hard',
'-mfpu=fpv4-sp-d16',
]
The slution for this was to update the core library. Still doesn't work though, I ended upd diging and making a draft pull request to the upstream repo (https://github.com/PaulStoffregen/cores/pull/356). If you could take a look and see if you can help, it would be appreciated.
I would also appreciate if you could verify that my changes didn't break anything for the Teensy 3.5. I have a sample repo ready to go at https://github.com/FFY00/teensy-meson-sample if you want to test, you probably just need to change the gcc path in the cross files.
Thank you :grin:
I am trying to use this with a Teensy 3.2. I modified the cross file acordingly but I've ran into a problem.
I fixed the first error by adding
-Wl,--defsym=__rtc_localtime=(current timestamp)
to the linker args but I still get: