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

Fix for issue #8185 (added SPI default pins for M5Stack Stamp S3 board) #8187

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

bsergei
Copy link
Contributor

@bsergei bsergei commented May 10, 2023

By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes


Description of Change

Add definition for SPI pins in board's specific pins_arduino.h so SPI.cpp for ESP32-S3 would be able to compile. GPIOs 34, 35, 36, 37 are available on LCD port of the development board and have the same meaning.

Tests scenarios

I have tested my pull request on M5Stack Stamp S3 board with sketch provided in issue #8185.

Related links

Closes #8185

@CLAassistant
Copy link

CLAassistant commented May 10, 2023

CLA assistant check
All committers have signed the CLA.

@me-no-dev
Copy link
Member

LCD port is marked for parallel. I suggest that you add pins that are available on the headers

@bsergei
Copy link
Contributor Author

bsergei commented May 14, 2023

LCD port is marked for parallel. I suggest that you add pins that are available on the headers

Done, copied SPI PINs mapping from Stamp C3.

@karol-brejna-i
Copy link

Any news on this one?

@bsergei
Copy link
Contributor Author

bsergei commented Jun 5, 2023

I think this is not actual, as most recent version contains this fix.

@bsergei bsergei closed this Jun 5, 2023
@MadMaxDP
Copy link

MadMaxDP commented Jun 6, 2023

Newbie question but how long does it take for this to be pulled through to VSCode/PlatformIO? I am still getting this issue with the "builtin" board configuration. I did use your fix (@bsergei) to repair this so not urgent, was just wondering.

@karol-brejna-i
Copy link

@bsergei Still getting the errors on VSCode/PlatformIO for StampS3... Any particular release/update I should be looking for?

@karol-brejna-i
Copy link

ATTOW, I am still getting the errors on VSCode/PlatformIO for StampS3... Any particular release/update I should be looking for?
I tested espressif32@6.3.1 platform installed in PlatformIO...

Executing task in folder test-s3-stamp: C:\Users\test\.platformio\penv\Scripts\platformio.exe run 

Processing m5stack-stamps3 (platform: espressif32 @ ^6.3.1; board: m5stack-stamps3; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-stamps3.html
PLATFORM: Espressif 32 (6.3.1) > M5Stack StampS3
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20009.0 (2.0.9) 
 - tool-esptoolpy @ 1.40501.0 (4.5.1) 
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 35 compatible libraries
Scanning dependencies...
Dependency Graph
|-- FastLED @ 3.6.0
Building in release mode
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\FastLED.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\bitswap.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\colorpalettes.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\colorutils.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\hsv2rgb.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\lib8tion.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\noise.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\platforms.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\platforms\esp\32\clockless_rmt_esp32.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\power_mgt.cpp.o
Compiling .pio\build\m5stack-stamps3\lib553\FastLED\wiring.cpp.o
Compiling .pio\build\m5stack-stamps3\src\main.cpp.o
Building .pio\build\m5stack-stamps3\bootloader.bin
esptool.py v4.5.1
Creating esp32s3 image...
Merged 1 ELF section
Successfully created esp32s3 image.
Generating partitions .pio\build\m5stack-stamps3\partitions.bin
In file included from .pio/libdeps/m5stack-stamps3/FastLED/src/FastLED.h:75,
                 from src/main.cpp:2:
.pio/libdeps/m5stack-stamps3/FastLED/src/fastspi.h:157:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling .pio\build\m5stack-stamps3\lib1db\SPI\SPI.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\Esp.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\FirmwareMSC.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\HWCDC.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\HardwareSerial.cpp.o
C:/Users/kbrejna/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp: In member function 'void SPIClass::begin(int8_t, int8_t, int8_t, int8_t)':
C:/Users/kbrejna/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:87:37: error: 'SCK' was not declared in this scope
         _sck = (_spi_num == FSPI) ? SCK : -1;
                                     ^~~
C:/Users/kbrejna/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:87:37: note: suggested alternative: 'SCL'
         _sck = (_spi_num == FSPI) ? SCK : -1;
                                     ^~~
                                     SCL
C:/Users/kbrejna/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:88:38: error: 'MISO' was not declared in this scope
         _miso = (_spi_num == FSPI) ? MISO : -1;
                                      ^~~~
C:/Users/kbrejna/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:89:38: error: 'MOSI' was not declared in this scope
         _mosi = (_spi_num == FSPI) ? MOSI : -1;
                                      ^~~~
C:/Users/kbrejna/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:90:36: error: 'SS' was not declared in this scope
         _ss = (_spi_num == FSPI) ? SS : -1;
                                    ^~
C:/Users/kbrejna/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:90:36: note: suggested alternative: 'PS'
         _ss = (_spi_num == FSPI) ? SS : -1;
                                    ^~
                                    PS
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\IPv6Address.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\MD5Builder.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\Print.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\m5stack-stamps3\FrameworkArduino\StreamString.cpp.o
*** [.pio\build\m5stack-stamps3\lib1db\SPI\SPI.cpp.o] Error 1

@bsergei
Copy link
Contributor Author

bsergei commented Jun 6, 2023

Indeed, most recent variants/m5stack_stamp_s3/pins_arduino.h doesn't contain SPI pins definition. I was confused with issue-8185 branch comparison.

@bsergei bsergei reopened this Jun 6, 2023
@bsergei bsergei force-pushed the issue-8185 branch 2 times, most recently from f1ad07c to 5fb3b03 Compare June 6, 2023 09:17
@karol-brejna-i
Copy link

Cool.

@bsergei could you suggest a way for testing the change in VSC with PlatformIO?

I see I can use the specific platform in my platformio.ini:

[env:m5stack-stamps3]
platform = https://github.com/platformio/platform-espressif32.git
board = m5stack-stamps

Is there a way to force the IDE to use your branch of arduino-esp32?

@14yannick
Copy link

14yannick commented Aug 17, 2023

@karol-brejna-i this worked for me
`[env:m5stack-stamps3]

platform = espressif32

framework = arduino

platform_packages = framework-arduinoespressif32 @ https://github.com/bsergei/arduino-esp32.git#issue-8185

board = m5stack-stamps3`

@P-R-O-C-H-Y P-R-O-C-H-Y added the Status: Pending Merge Pull Request is ready to be merged label Aug 23, 2023
@P-R-O-C-H-Y P-R-O-C-H-Y added this to the 2.0.12 milestone Aug 23, 2023
@me-no-dev me-no-dev merged commit c814a23 into espressif:master Aug 30, 2023
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Merge Pull Request is ready to be merged Type: 3rd party Boards
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler errors in SPI.cpp for M5Stack Stamp S3 (m5stack_stamp_s3 variant)
8 participants