Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sketches with Serial.begin() will not compile unmodified for arduino:mbed_portenta:portenta_x8 #74

Closed
3 tasks done
aliphys opened this issue May 21, 2024 · 1 comment
Closed
3 tasks done
Assignees
Labels
conclusion: declined Will not be worked on type: imperfection Perceived defect in any part of project

Comments

@aliphys
Copy link

aliphys commented May 21, 2024

Describe the problem

Sketches involving the Serial.begin() will not compile, without adding #include "SerialRPC.h" at beginning of sketch. It will compile when #include "SerialRPC.h is added to the beginning of the sketch

To reproduce

From root of repository run

cd .\examples\01.Basics\AnalogReadSerial\
arduino-cli compile -b arduino:mbed_portenta:portenta_x8 -v
Output

PS C:\GitHub\Arduino\arduino-examples> cd .\examples\01.Basics\AnalogReadSerial\
PS C:\GitHub\Arduino\arduino-examples\examples\01.Basics\AnalogReadSerial> arduino-cli version
arduino-cli  Version: 1.0.0-rc.1 Commit: ba19a2d3 Date: 2024-05-20T08:22:20Z
PS C:\GitHub\Arduino\arduino-examples\examples\01.Basics\AnalogReadSerial> arduino-cli compile -b arduino:mbed_portenta:portenta_x8 -v

FQBN: arduino:mbed_portenta:portenta_x8
Using board 'portenta_x8' from platform in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3
Using core 'arduino' from platform in folder: C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3

Detecting libraries used...
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\variants\PORTENTA_X8/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\variants\PORTENTA_X8/cxxflags.txt -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_X8 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\variants\PORTENTA_X8 -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\variants\PORTENTA_X8/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\056DCEC076E532137E9F3A17145D1D1C\sketch\AnalogReadSerial.ino.cpp -o nul
Generating function prototypes...
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -c -w -g3 -nostdlib @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\variants\PORTENTA_X8/defines.txt @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\variants\PORTENTA_X8/cxxflags.txt -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_X8 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\cores\arduino -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\variants\PORTENTA_X8 -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\cores\arduino/api/deprecated -IC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\cores\arduino/api/deprecated-avr-comp -iprefixC:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\cores\arduino @C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3\variants\PORTENTA_X8/includes.txt C:\Users\Ali Jahangiri\AppData\Local\Temp\arduino\sketches\056DCEC076E532137E9F3A17145D1D1C\sketch\AnalogReadSerial.ino.cpp -o C:\Users\Ali Jahangiri\AppData\Local\Temp\1542543350\sketch_merged.cpp
C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\Ali Jahangiri\AppData\Local\Temp\1542543350\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -c -w -g3 -nostdlib "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed_portenta\\4.1.3\\variants\\PORTENTA_X8/defines.txt" "@C:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed_portenta\\4.1.3\\variants\\PORTENTA_X8/cxxflags.txt" -MMD -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -DARDUINO=10607 -DARDUINO_PORTENTA_X8 -DARDUINO_ARCH_MBED_PORTENTA -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=0 "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed_portenta\\4.1.3\\cores\\arduino" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed_portenta\\4.1.3\\variants\\PORTENTA_X8" -DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed_portenta\\4.1.3\\cores\\arduino/api/deprecated" "-IC:\\Users\\Ali Jahangiri\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\mbed_portenta\\4.1.\Ali Jahangiri\\AppData\\Local\\Temp\\arduino\\sketches\\056DCEC076E532137E9F3A17145D1D1C\\sketch\\AnalogReadSerial.ino.cpp.o"
C:\GitHub\Arduino\arduino-examples\examples\01.Basics\AnalogReadSerial\AnalogReadSerial.ino: In function 'void setup()':
C:\GitHub\Arduino\arduino-examples\examples\01.Basics\AnalogReadSerial\AnalogReadSerial.ino:16:15: error: call to 'ErrorSerialClass::begin' declared with attribute error:

****
Please include SerialRPC library to use Serial
****


   Serial.begin(9600);


Used platform         Version Path
arduino:mbed_portenta 4.1.3   C:\Users\Ali Jahangiri\AppData\Local\Arduino15\packages\arduino\hardware\mbed_portenta\4.1.3
Error during build: exit status 1

Expected behavior

In the Out of Box (OoB) experience for the Portenta X8, it is possible to compile and run Arduino example sketches (included in the IDE) using Serial functionality without any additional modification.

The Arduino website mentions the ability to run Arduino code on the auxiliary core of the Portenta X8 in many places, including:

The examples version

5d991a2

Additional context

Repeatable with Arduino IDE 2.3.2
image

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@per1234
Copy link
Contributor

per1234 commented May 21, 2024

Hi @aliphys. The examples hosted in this repository are intended to serve as an introduction to the Arduino programming language. Although we could add support to the examples for the Portenta X8, the added added code would make the examples significantly less approachable to beginners.

Since the Portenta X8 is a "PRO" product, which is only for use by advanced users, it is not worth making harmful changes to the examples hosted in this repository in order to support that board.

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
@per1234 per1234 added the conclusion: declined Will not be worked on label May 21, 2024
@per1234 per1234 changed the title [ACELL04] Sketches with Serial.begin() will not compile unmodified for arduino:mbed_portenta:portenta_x8 Sketches with Serial.begin() will not compile unmodified for arduino:mbed_portenta:portenta_x8 May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: declined Will not be worked on type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants