Compile error "default" sketch for p2 under deviceos 6.2.1 on visual studio on macos

after some time working on p1/photon code (old deviceos) i returned to working on the p2...

i created a new (empty) project in visual studio (macos) and configured for p2 device and deviceos 6.2.1 and made sure all was up to date: trying to compile the empty sketch gives:

 *  Executing task: make -f '/Users/frank/.particle/toolchains/buildscripts/1.16.0/Makefile' compile-all -s 


:::: COMPILING APPLICATION & DEVICE OS

  /Users/frank/.particle/toolchains/deviceOS/6.2.1/modules/tron/system-part1/makefile /Users/frank/.particle/toolchains/deviceOS/6.2.1/modules/tron/user-part/makefile
<command-line>: error: ISO C++11 requires whitespace after the macro name [-Werror]
In file included from ../hal/src/rtl872x/interrupts_irq.h:94,
                 from ../hal/inc/interrupts_hal.h:33,
                 from src/malloc.cpp:12:
../third_party/ambd_sdk/ambd_sdk/component/soc/realtek/amebad/cmsis/core_armv8mbl.h:88:6: error: #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
   88 |     #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
      |      ^~~~~
cc1plus: all warnings being treated as errors
make[4]: *** [../build/target/newlib_nano/platform-32-m/./src/malloc.o] Error 1
make[3]: *** [newlib_nano] Error 2
make[2]: *** [/Users/frank/.particle/toolchains/deviceOS/6.2.1/modules/tron/system-part1/makefile] Error 2
make[1]: *** [make-modules] Error 2
make: *** [compile-all] Error 2

 *  The terminal process "/bin/bash '-c', 'make -f '/Users/frank/.particle/toolchains/buildscripts/1.16.0/Makefile' compile-all -s'" terminated with exit code: 2. 
 *  Press any key to close the terminal.

anyone any idea?

thanks
frank

Strange, I am not able to recreate on my end. A P2 6.2.1 target on MacOS compiles OK for me. Maybe try an uninstall / reinstall of Workbench VSCode extension?

Can you target a different device / device OS version? Does that compile?

p1 with deviceos 3.3.1 works ok

macos 15.5. you?

might be macos (recently updated) but not sure since i have not worked with the p2 in a while

will try to reinstall!

Oh, I see what might be the problem. Is there a reason you're choosing the "Particle: Compile application & Device OS (local)" options versus the typical "Particle: Compile application (local)" command?

great! that does work! thank you!

i just clicked the "local compile" button in the "welcome to particle workbench" tab (used to work fine)

 *  Executing task: make -f '/Users/frank/.particle/toolchains/buildscripts/1.16.0/Makefile' compile-user -s 


:::: COMPILING APPLICATION

Creating /Users/frank/Code/P2Zandbak/target/6.2.1/p2/memory_platform_user.ld ...
Creating /Users/frank/Code/P2Zandbak/target/6.2.1/p2/memory_platform_user.ld ...
   text    data     bss     dec     hex filename
  12138     124     466   12728    31b8 /Users/frank/Code/P2Zandbak/target/6.2.1/p2/P2Zandbak.elf

*** COMPILED SUCCESSFULLY ***

 *  Press any key to close the terminal.
1 Like