PlatformIO update for 1.58 - please help test

PaulStoffregen

Well-known member
For anyone trying this, here's a first try at a PR that adds teensy_secure support:
https://github.com/platformio/platform-teensy/pull/98

In my opinion, there's a few minor issues with it:
1. Untested on Windows or Linux.
2. The informational messages could use a bit of improvement (see the initial PR comment).
3. Even though the "custom_" prefix is the way to add custom parameters, I don't love how "custom_secure_key" looks.

I've used it regularly, however, and it appears to work well.
 
Seems as though I must have not upgraded my teensy41 PlatformIO project correctly - after jumping on the repo version of the teensy platform (4.17.0+sha.525598d), I immediately ran into compiler / syntax issues in underlying 11.3.1 toolchain libraries.

When running on macOS Ventura / Visual Studio Code 1.77.1 / PlatformIO 6.1.6, here is some verbose output where it first appears to complain when compiling ConnectionManager.cpp within Shawn's excellent QNEthernet (though I'm not convinced it really has anything to do with QNEthernet):
Code:
[...]

CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy41.html
PLATFORM: Teensy (4.17.0+sha.525598d) (git+https://github.com/platformio/platform-teensy.git) > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES: 
 - framework-arduinoteensy @ 1.158.0 (1.58) 
 - tool-teensy @ 1.158.0 (1.58) 
 - toolchain-gccarmnoneeabi-teensy @ 1.110301.0 (11.3.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 98 compatible libraries
Scanning dependencies...
Dependency Graph
|-- DebugLog @ 0.6.6 (License: MIT, Path: /Users/j/Sandbox/Spritz/.pio/libdeps/bspark/DebugLog)
|-- Debouncer @ 0.2.9 (License: MIT, Path: /Users/j/Sandbox/Spritz/.pio/libdeps/bspark/Debouncer)
|-- TimeProfiler @ 0.1.7 (License: MIT, Path: /Users/j/Sandbox/Spritz/.pio/libdeps/bspark/TimeProfiler)
|-- TeensyTimerTool @ 1.3.0 (License: Unknown, Path: /Users/j/Sandbox/Spritz/.pio/libdeps/bspark/TeensyTimerTool)
|-- QNEthernet @ 0.19.0 (License: MIT, Path: /Users/j/Sandbox/Spritz/.pio/libdeps/bspark/QNEthernet)
|   |-- Entropy (License: Unknown, Path: /Users/j/.platformio/packages/framework-arduinoteensy/libraries/Entropy)
|-- ledbus (License: Unknown, Path: /Users/j/Sandbox/Sandbox/Spritz/lib/ledbus)
Building in release mode

[...]

rm-none-eabi-g++ -o .pio/build/bspark/libef6/QNEthernet/QNEthernetUDP.cpp.o -c -fno-exceptions -felide-constructors -fno-rtti -std=gnu++14 -Wno-error=narrowing -fpermissive -fno-threadsafe-statics -O3 -Wall -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m7 -nostdlib -mfloat-abi=hard -mfpu=fpv5-d16 -O2 -DPLATFORMIO=60106 -D__IMXRT1062__ -DARDUINO_TEENSY41 -DUSB_SERIAL -DARDUINO=10805 -DTEENSYDUINO=158 -DCORE_TEENSY -DF_CPU=600000000 -DLAYOUT_US_ENGLISH -I.pio/libdeps/bspark/QNEthernet/include -I.pio/libdeps/bspark/QNEthernet/src -I/Users/j/.platformio/packages/framework-arduinoteensy/libraries/Entropy -I/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4 .pio/libdeps/bspark/QNEthernet/src/QNEthernetUDP.cpp
arm-none-eabi-g++ -o .pio/build/bspark/libef6/QNEthernet/QNMDNS.cpp.o -c -fno-exceptions -felide-constructors -fno-rtti -std=gnu++14 -Wno-error=narrowing -fpermissive -fno-threadsafe-statics -O3 -Wall -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m7 -nostdlib -mfloat-abi=hard -mfpu=fpv5-d16 -O2 -DPLATFORMIO=60106 -D__IMXRT1062__ -DARDUINO_TEENSY41 -DUSB_SERIAL -DARDUINO=10805 -DTEENSYDUINO=158 -DCORE_TEENSY -DF_CPU=600000000 -DLAYOUT_US_ENGLISH -I.pio/libdeps/bspark/QNEthernet/include -I.pio/libdeps/bspark/QNEthernet/src -I/Users/j/.platformio/packages/framework-arduinoteensy/libraries/Entropy -I/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4 .pio/libdeps/bspark/QNEthernet/src/QNMDNS.cpp
arm-none-eabi-g++ -o .pio/build/bspark/libef6/QNEthernet/internal/ConnectionManager.cpp.o -c -fno-exceptions -felide-constructors -fno-rtti -std=gnu++14 -Wno-error=narrowing -fpermissive -fno-threadsafe-statics -O3 -Wall -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m7 -nostdlib -mfloat-abi=hard -mfpu=fpv5-d16 -O2 -DPLATFORMIO=60106 -D__IMXRT1062__ -DARDUINO_TEENSY41 -DUSB_SERIAL -DARDUINO=10805 -DTEENSYDUINO=158 -DCORE_TEENSY -DF_CPU=600000000 -DLAYOUT_US_ENGLISH -I.pio/libdeps/bspark/QNEthernet/include -I.pio/libdeps/bspark/QNEthernet/src -I/Users/j/.platformio/packages/framework-arduinoteensy/libraries/Entropy -I/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4 .pio/libdeps/bspark/QNEthernet/src/internal/ConnectionManager.cpp
In file included from /Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:46,
                 from /Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
                 from src/main.cpp:5:
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc: In member function 'void std::poisson_distribution<_IntType>::param_type::_M_initialize()':
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:174:18: error: expected unqualified-id before '(' token
  174 | #define round(x) ((long) __builtin_round(x))
      |                  ^
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc: In member function 'std::poisson_distribution<_IntType>::result_type std::poisson_distribution<_IntType>::operator()(_UniformRandomNumberGenerator&, const std::poisson_distribution<_IntType>::param_type&)':
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:164:16: error: expected unqualified-id before '(' token
  164 | #define abs(x) ({ \
      |                ^
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:165:3: error: expected primary-expression before 'typeof'
  165 |   typeof(x) _x = (x); \
      |   ^~~~~~
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:165:3: error: expected '}' before 'typeof'
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:164:17: note: to match this '{'
  164 | #define abs(x) ({ \
      |                 ^
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:165:3: error: expected ')' before 'typeof'
  165 |   typeof(x) _x = (x); \
      |   ^~~~~~
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:164:16: note: to match this '('
  164 | #define abs(x) ({ \
      |                ^
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:166:4: error: '_x' was not declared in this scope; did you mean '__x'?
  166 |   (_x > 0) ? _x : -_x; \
      |    ^~
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:167:2: error: expected primary-expression before ')' token
  167 | })
      |  ^
In file included from /Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/random:51,
                 from include/Base.h:15,
                 from include/BSpark.h:4,
                 from src/main.cpp:7:
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1346:38: error: '__y' was not declared in this scope; did you mean '__w'?
 1346 |                     __x = std::floor(__y);
      |                                      ^~~
      |                                      __w
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1347:28: error: '__n' was not declared in this scope; did you mean '__w'?
 1347 |                     __w = -__n * __n / 2;
      |                            ^~~
      |                            __w
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1351:22: error: expected 'while' before 'if'
 1351 |                 else if (__u <= __c2)
      |                      ^~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1351:22: error: expected '(' before 'if'
 1351 |                 else if (__u <= __c2)
      |                      ^~
      |                      (
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1351:22: error: expected primary-expression before 'if'
 1351 |                 else if (__u <= __c2)
      |                      ^~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1351:21: error: expected ')' before 'if'
 1351 |                 else if (__u <= __c2)
      |                     ^~~
      |                     )
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1351:21: error: expected ';' before 'if'
 1351 |                 else if (__u <= __c2)
      |                     ^~~
      |                     ;
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1351:26: error: '__u' was not declared in this scope; did you mean '_Mu'?
 1351 |                 else if (__u <= __c2)
      |                          ^~~
      |                          _Mu
In file included from /Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/WProgram.h:46,
                 from /Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/Arduino.h:6,
                 from src/main.cpp:5:
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:164:16: error: expected unqualified-id before '(' token
  164 | #define abs(x) ({ \
      |                ^
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:165:3: error: expected primary-expression before 'typeof'
  165 |   typeof(x) _x = (x); \
      |   ^~~~~~
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:165:3: error: expected '}' before 'typeof'
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:164:17: note: to match this '{'
  164 | #define abs(x) ({ \
      |                 ^
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:165:3: error: expected ')' before 'typeof'
  165 |   typeof(x) _x = (x); \
      |   ^~~~~~
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:164:16: note: to match this '('
  164 | #define abs(x) ({ \
      |                ^
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:166:4: error: '_x' was not declared in this scope; did you mean '__x'?
  166 |   (_x > 0) ? _x : -_x; \
      |    ^~
/Users/j/.platformio/packages/framework-arduinoteensy/cores/teensy4/wiring.h:167:2: error: expected primary-expression before ')' token
  167 | })
      |  ^
In file included from /Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/random:51,
                 from include/Base.h:15,
                 from include/BSpark.h:4,
                 from src/main.cpp:7:
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1355:37: error: '__y' was not declared in this scope; did you mean '__c'?
 1355 |                     __x = std::ceil(__y);
      |                                     ^~~
      |                                     __c
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1356:21: error: '__w' was not declared in this scope; did you mean '__c'?
 1356 |                     __w = __y * (2 - __y) * __param._M_1cx;
      |                     ^~~
      |                     __c
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1358:23: error: continue statement not within a loop
 1358 |                       continue;
      |                       ^~~~~~~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1360:26: error: '__u' was not declared in this scope; did you mean '_Mu'?
 1360 |                 else if (__u <= __c3)
      |                          ^~~
      |                          _Mu
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1360:33: error: '__c3' was not declared in this scope
 1360 |                 else if (__u <= __c3)
      |                                 ^~~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1363:19: error: '__x' was not declared in this scope
 1363 |                   __x = -1;
      |                   ^~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1364:33: error: '__c4' was not declared in this scope
 1364 |                 else if (__u <= __c4)
      |                                 ^~~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1365:19: error: '__x' was not declared in this scope
 1365 |                   __x = 0;
      |                   ^~~
arm-none-eabi-gcc-ar rc .pio/build/bspark/libce3/libEntropy.a .pio/build/bspark/libce3/Entropy/Entropy.cpp.o
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1366:33: error: '__c5' was not declared in this scope
 1366 |                 else if (__u <= __c5)
      |                                 ^~~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1368:21: error: '__x' was not declared in this scope
 1368 |                     __x = 1;
      |                     ^~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1370:21: error: '__w' was not declared in this scope
 1370 |                     __w = __178;
      |                     ^~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1370:27: error: '__178' was not declared in this scope
 1370 |                     __w = __178;
      |                           ^~~~~
arm-none-eabi-gcc-ar rc .pio/build/bspark/lib346/libTeensyTimerTool.a .pio/build/bspark/lib346/TeensyTimerTool/API/Timer.cpp.o .pio/build/bspark/lib346/TeensyTimerTool/API/baseTimer.cpp.o .pio/build/bspark/lib346/TeensyTimerTool/ErrorHandling/error_handler.cpp.o .pio/build/bspark/lib346/TeensyTimerTool/TimerModules/GPT/GPTChannel.cpp.o .pio/build/bspark/lib346/TeensyTimerTool/TimerModules/PIT4/PIT.cpp.o .pio/build/bspark/lib346/TeensyTimerTool/TimerModules/TCK/TCK.cpp.o .pio/build/bspark/lib346/TeensyTimerTool/TimerModules/TCK/TckChannelBase.cpp.o .pio/build/bspark/lib346/TeensyTimerTool/TimerModules/TCK/tickCounters.cpp.o .pio/build/bspark/lib346/TeensyTimerTool/config.cpp.o
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1376:46: error: '__2cx' was not declared in this scope
 1376 |                                      + __v * __2cx / __param._M_d;
      |                                              ^~~~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1377:21: error: '__x' was not declared in this scope; did you mean '__y'?
 1377 |                     __x = std::ceil(__y);
      |                     ^~~
      |                     __y
arm-none-eabi-gcc-ar -s .pio/build/bspark/libce3/libEntropy.a
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1378:21: error: '__w' was not declared in this scope; did you mean '__y'?
 1378 |                     __w = -__param._M_d * __param._M_1cx * (1 + __y / 2);
      |                     ^~~
      |                     __y
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1381:17: error: '__reject' was not declared in this scope; did you mean '_reent'?
 1381 |                 __reject = (__w - __e - __x * __param._M_lm_thr
      |                 ^~~~~~~~
      |                 _reent
arm-none-eabi-gcc-ar -s .pio/build/bspark/lib346/libTeensyTimerTool.a
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1381:29: error: '__w' was not declared in this scope
 1381 |                 __reject = (__w - __e - __x * __param._M_lm_thr
      |                             ^~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1381:35: error: '__e' was not declared in this scope
 1381 |                 __reject = (__w - __e - __x * __param._M_lm_thr
      |                                   ^~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1381:41: error: '__x' was not declared in this scope
 1381 |                 __reject = (__w - __e - __x * __param._M_lm_thr
      |                                         ^~~
/Users/j/.platformio/packages/toolchain-gccarmnoneeabi-teensy/arm-none-eabi/include/c++/11.3.1/bits/random.tcc:1382:66: error: '__m' was not declared in this scope; did you mean '__tm'?
 1382 |                             > __param._M_lfm - std::lgamma(__x + __m + 1));
      |                                                                  ^~~
      |                                                                  __tm

[...]

Any ideas what I might have skipped over in the upgrade process that results in this?
 
Can we see your source code? The errors look like they originate from src/main.cpp and not from ConnectionManager.cpp. Also, can we see your platformio.ini file?
 
Last edited:
Sorry I should have offered a reduction - the issue reproduces for me after creating a new project, copying over the dependencies and collapsing all includes into an otherwise uneventful main.cpp.

platformio.ini
Code:
[common]
platform = https://github.com/platformio/platform-teensy.git
board = teensy41
framework = arduino
build_flags = -O3
monitor_speed = 115200
monitor_filters = time, colorize
lib_deps = 
	hideakitai/DebugLog@^0.6.6
	hideakitai/Debouncer@^0.2.9
	hideakitai/TimeProfiler@^0.1.7
	luni64/TeensyTimerTool@^1.3.0
	ssilverman/QNEthernet@^0.19.0
check_tool = clangtidy

[env:task]
extends = common
build_flags = 
	${common.build_flags}

src/main.cpp
Code:
#include <Arduino.h>

#include <stdint.h>

#include <cmath>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <iostream>
#include <iterator>
#include <random>

#include <QNEthernet.h>

#include <TeensyTimerTool.h>

#include <DebugLog.h>
#include <TimeProfiler.h>

#include <algorithm>

#include <DMAChannel.h>

#include <iterator>

#include <Debouncer.h>

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}
 
If you want to use <random>, I suggest using the Entropy class to get entropy and then running it through a PRNG such as Fortuna.

[Note: I saw your response to this thread by email (mentioning the random include), but I'm not seeing it here.]
 
Sorry, I was trying to thread my reply correctly and ended up getting tripped up by dup checking.

Turns out the issue is coming from #include <random> - is it possible something in that header didn't get updated for the new toolchain ?

Definitely agree about using Entropy for anything real, I had just been generating a random string for MDNS hostnames…
 
Yeah, I hear you. I like to thread the messages properly too. :)

I'm not sure about <random> because I haven't played with it much. Are you saying the exact same code compiled on earlier versions of Teensyduino?

For mDNS hostnames, may I suggest using the last 6 characters of the MAC address instead? Here's some example code (off the cuff and copied from something else, so you'll have to check it):

Code:
  // Given a 'hostname', either some default value or created here
  std::string hostname{config.hostname};
  if (hostname.empty()) {
    hostname = "teensy";
  }

  if (config.appendMACToHostname) {
    // Reserve 7 chars for the MAC part
    if (hostname.length() > 56) {
      hostname.resize(56);
    }
    uint8_t mac[6];
    Ethernet.macAddress(mac);
    hostname += ::util::format("-%02" PRIx8 "%02" PRIx8 "%02" PRIx8, mac[3], mac[4], mac[5]);
  } else if (hostname.length() > 63) {
    hostname.resize(63);
  }

  if (MDNS.begin(hostname.c_str())) {
    logger.info("Adding mDNS HTTP service: http://%s.local:%" PRIu16,
                hostname.c_str(), config.httpPort);
    if (!MDNS.addService("_http", "_tcp", config.httpPort,
                         []() { return std::vector<String>{"path=/"}; })) {
      logger.error("Failed to add mDNS HTTP service");
    }
  } else {
    logger.error("Failed to start mDNS");
  }
 
Correct, Teensyduino 1.57 could include random, but 1.58 now trips up on it in my experience.

Using the MAC is way more sensible, thanks for the suggestion, helping get my 1.58 upgrade pointed in the right direction and for QNEthernet!
 
I'm having some issues with TeensyStep - will file an issue with luni

with platformio.ini:

Code:
[env:teensy35]
platform = teensy
framework = arduino
board = teensy35
lib_deps = https://github.com/luni64/TeensyStep.git

I get a bunch of errors:

Code:
In file included from /home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:46,
                 from /home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
                 from .pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:1:
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: In member function 'TeensyStep::Stepper& TeensyStep::Stepper::setPullInSpeed(int32_t)':
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:16: error: expected unqualified-id before '(' token
  141 | #define abs(x) ({ \
      |                ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected primary-expression before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected '}' before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:17: note: to match this '{'
  141 | #define abs(x) ({ \
      |                 ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected ')' before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:16: note: to match this '('
  141 | #define abs(x) ({ \
      |                ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:143:4: error: '_x' was not declared in this scope
  143 |   (_x > 0) ? _x : -_x; \
      |    ^~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:144:1: warning: no return statement in function returning non-void [-Wreturn-type]
  144 | })
      | ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: At global scope:
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:144:2: error: expected unqualified-id before ')' token
  144 | })
      |  ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:91:9: error: expected unqualified-id before 'return'
   91 |         return *this;
      |         ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:94:5: error: 'Stepper' does not name a type
   94 |     Stepper& Stepper::setPullInOutSpeed(int32_t pullInSpeed, int32_t pullOutSpeed)
      |     ^~~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:102:10: error: 'Stepper' has not been declared
  102 |     void Stepper::setTargetAbs(int32_t target)
      |          ^~~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: In function 'void setTargetAbs(int32_t)':
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:104:31: error: 'current' was not declared in this scope
  104 |         setTargetRel(target - current);
      |                               ^~~~~~~
Compiling .pio/build/teensy35/FrameworkArduino/HardwareSerial.cpp.o
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:104:9: error: 'setTargetRel' was not declared in this scope; did you mean 'setTargetAbs'?
  104 |         setTargetRel(target - current);
      |         ^~~~~~~~~~~~
      |         setTargetAbs
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: At global scope:
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:107:10: error: 'Stepper' has not been declared
  107 |     void Stepper::setTargetRel(int32_t delta)
      |          ^~~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: In function 'void setTargetRel(int32_t)':
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:109:9: error: 'setDir' was not declared in this scope
Compiling .pio/build/teensy35/FrameworkArduino/HardwareSerial1.cpp.o
  109 |         setDir(delta < 0 ? -1 : 1);
      |         ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:110:9: error: 'target' was not declared in this scope
  110 |         target = current + delta;
      |         ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:110:18: error: 'current' was not declared in this scope
  110 |         target = current + delta;
      |                  ^~~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:9: error: 'A' was not declared in this scope; did you mean 'A9'?
  111 |         A = std::abs(delta);
      |         ^
      |         A9
In file included from /home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:46,
                 from /home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
                 from .pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:1:
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:16: error: expected unqualified-id before '(' token
  141 | #define abs(x) ({ \
      |                ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected primary-expression before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected '}' before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:17: note: to match this '{'
  141 | #define abs(x) ({ \
      |                 ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected ')' before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:16: note: to match this '('
  141 | #define abs(x) ({ \
      |                ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:143:4: error: '_x' was not declared in this scope
  143 |   (_x > 0) ? _x : -_x; \
      |    ^~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: At global scope:
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:144:2: error: expected unqualified-id before ')' token
Compiling .pio/build/teensy35/FrameworkArduino/HardwareSerial2.cpp.o
  144 | })
      |  ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:112:5: error: expected declaration before '}' token
  112 |     }
      |     ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:113:1: error: expected declaration before '}' token
  113 | }
      | ^
Compiling .pio/build/teensy35/FrameworkArduino/HardwareSerial3.cpp.o
*** [.pio/build/teensy35/liba5a/TeensyStep/Stepper.cpp.o] Error 1

edit 1: https://github.com/luni64/TeensyStep/issues/151
edit 2: 1st post after lurking for quite a while ... Hi everyone :D
 
Last edited:
Did it hit TeensyStep now? I'll fix this, reason usually is that Arduino #defines abs which messes up code which uses things like std::abs. Depends on the exact include sequence.
 
Hmm, it also happens with a completely empty project and no includes whatsoever:

Code:
void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}
 
Seems to be the same output as above (only change was removal of the Arduino.h include)

Code:
Building in release mode
Compiling .pio/build/teensy35/liba5a/TeensyStep/Stepper.cpp.o
Compiling .pio/build/teensy35/FrameworkArduino/pins_teensy.c.o
Compiling .pio/build/teensy35/FrameworkArduino/ser_print.c.o
Compiling .pio/build/teensy35/FrameworkArduino/serial1.c.o
Compiling .pio/build/teensy35/FrameworkArduino/serial2.c.o
Compiling .pio/build/teensy35/FrameworkArduino/serial3.c.o
Compiling .pio/build/teensy35/FrameworkArduino/serial4.c.o
Compiling .pio/build/teensy35/FrameworkArduino/serial5.c.o
Compiling .pio/build/teensy35/FrameworkArduino/serial6.c.o
In file included from /home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:46,
                 from /home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
                 from .pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:1:
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: In member function 'TeensyStep::Stepper& TeensyStep::Stepper::setPullInSpeed(int32_t)':
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:16: error: expected unqualified-id before '(' token
  141 | #define abs(x) ({ \
      |                ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected primary-expression before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected '}' before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:17: note: to match this '{'
  141 | #define abs(x) ({ \
      |                 ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected ')' before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:16: note: to match this '('
  141 | #define abs(x) ({ \
      |                ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:143:4: error: '_x' was not declared in this scope
  143 |   (_x > 0) ? _x : -_x; \
      |    ^~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:144:1: warning: no return statement in function returning non-void [-Wreturn-type]
  144 | })
      | ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: At global scope:
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:144:2: error: expected unqualified-id before ')' token
  144 | })
      |  ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:90:35: note: in expansion of macro 'abs'
   90 |         vPullIn = vPullOut = std::abs(speed);
      |                                   ^~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:91:9: error: expected unqualified-id before 'return'
   91 |         return *this;
      |         ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:94:5: error: 'Stepper' does not name a type
   94 |     Stepper& Stepper::setPullInOutSpeed(int32_t pullInSpeed, int32_t pullOutSpeed)
      |     ^~~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:102:10: error: 'Stepper' has not been declared
  102 |     void Stepper::setTargetAbs(int32_t target)
      |          ^~~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: In function 'void setTargetAbs(int32_t)':
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:104:31: error: 'current' was not declared in this scope
  104 |         setTargetRel(target - current);
      |                               ^~~~~~~
Compiling .pio/build/teensy35/FrameworkArduino/serial6_lpuart.c.o
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:104:9: error: 'setTargetRel' was not declared in this scope; did you mean 'setTargetAbs'?
  104 |         setTargetRel(target - current);
      |         ^~~~~~~~~~~~
      |         setTargetAbs
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: At global scope:
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:107:10: error: 'Stepper' has not been declared
  107 |     void Stepper::setTargetRel(int32_t delta)
      |          ^~~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: In function 'void setTargetRel(int32_t)':
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:109:9: error: 'setDir' was not declared in this scope
  109 |         setDir(delta < 0 ? -1 : 1);
      |         ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:110:9: error: 'target' was not declared in this scope
  110 |         target = current + delta;
      |         ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:110:18: error: 'current' was not declared in this scope
  110 |         target = current + delta;
      |                  ^~~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:9: error: 'A' was not declared in this scope; did you mean 'A9'?
  111 |         A = std::abs(delta);
      |         ^
      |         A9
In file included from /home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:46,
                 from /home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
                 from .pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:1:
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:16: error: expected unqualified-id before '(' token
  141 | #define abs(x) ({ \
      |                ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected primary-expression before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected '}' before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:17: note: to match this '{'
  141 | #define abs(x) ({ \
      |                 ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:142:3: error: expected ')' before 'typeof'
  142 |   typeof(x) _x = (x); \
      |   ^~~~~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:16: note: to match this '('
  141 | #define abs(x) ({ \
      |                ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:143:4: error: '_x' was not declared in this scope
  143 |   (_x > 0) ? _x : -_x; \
      |    ^~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp: At global scope:
/home/bimac/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:144:2: error: expected unqualified-id before ')' token
  144 | })
      |  ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:111:18: note: in expansion of macro 'abs'
  111 |         A = std::abs(delta);
      |                  ^~~
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:112:5: error: expected declaration before '}' token
  112 |     }
      |     ^
.pio/libdeps/teensy35/TeensyStep/src/Stepper.cpp:113:1: error: expected declaration before '}' token
  113 | }
      | ^
Compiling .pio/build/teensy35/FrameworkArduino/serialEvent.cpp.o
*** [.pio/build/teensy35/liba5a/TeensyStep/Stepper.cpp.o] Error 1
 
But this is clearly TeensyStep errors not generated by your empty sketch. You probably still have TeensyStep in the dependencies so it tries to compilie and runs into the error. I'll fix it tomorrow (to tired today)
 
Uh, yes - same TeensyStep dependency as above. I think I misunderstood your comment about the includes ... anyways, thanks for looking into it and have a nice evening!
 
Last edited:
Not sure if this is PlatformIO related or not but the build with the new release is almost too slow to be usable for me. I have macbook pro that is 2 years old, NOT at M1. Was pretty fast with 1.57 release and the same codebase. The build did however catch a few issues with my code that did not pop up before, so maybe the "extra work" is worth it... However, I cannot upgrade to 1.58 (platformio release 4.18.0) until the performance issues are resolved, or I get a new macbook :p
 
Updated TeensyStep to v2.3.3 which should fix the error. Let me know if it compiles now
 
Hello everybody! I did the upgrade yesterday (teensy framework 4.18) and faced some problems with stdint types on some files.

Code:
PLATFORM: Teensy (4.18.0+sha.4935fb6) > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES: 
 - framework-arduinoteensy @ 1.158.0 (1.58) 
 - tool-teensy @ 1.158.0 (1.58) 
 - toolchain-gccarmnoneeabi-teensy @ 1.110301.0 (11.3.1)

I am using macbook m1pro ventura Version*13.2.1 (22D68).

With 4.17 everything worked fine but now there is a lib folder where it can not seem to find int64_t and uint64_t definitions.

This a file included in my main build containing types definitions:
Code:
#include <stdint.h>


typedef int64_t chunk_T;
typedef uint64_t uchunk_T;

I got errors:
-error: unknown type name 'uint64_t'
-error: unknown type name 'uint64_t'

I tried reinstalling framework, include <Arduino.h>, stdint.h... Vscode linter seems happy but impossible to compile. Reverting back to teensy@4.17 is the only solutions that worked!

Any idea about things I can explore to solve this problem?

Thanks in advance!
 
It definitely compiles correctly in Arduino IDE.

screenshot.png

If nobody here knows, maybe tomorrow open an new issue on the platform-teensy github page.

https://github.com/platformio/platform-teensy/issues
 
Works fine for me in an otherwise empty PlatformIO project with pretty much the same setup though I'm running a current version of macOS Ventura and the tagged teensy-platform 4.18.0.

Can you share the verbose build output and your platformio.ini?
 
Thanks Paul and Jean Pierre for your answer!

For the uint64_t problem, the file that did not compile was in a gitlab repo included in libdeps. So even with the local inclusion of stdint.h, the build process was taking the wrong file from the repo even with my local modifications, sorry for that!

Also I did run in the problem encountered by Luni with std::abs. Even with #include <cmath>, it seems that abs was taking its definition in wiring.h.

Like him I added

Code:
#undef abs

It compiles fine now!! Also it was not necessary to undef abs in 4.17, is it normal it is now necessary in 4.18?
 
I had the same issue with 4.17 and with the Arduino IDE as well. That's why I've usually used #undef abs before #include <cmath>.
 
Back
Top