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

Update cubecell_board_v2.json #8

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

eiannone
Copy link
Contributor

@eiannone eiannone commented Apr 6, 2024

As stated in the official product page (https://heltec.org/project/htcc-ab01-v2/), MCU should be asr6502

As stated in the official product page (https://heltec.org/project/htcc-ab01-v2/), MCU should be asr6502
@ivankravets ivankravets merged commit 7986121 into HelTecAutomation:develop Apr 8, 2024
21 checks passed
@ivankravets
Copy link
Collaborator

Thanks for the PR!

@amirna2
Copy link

amirna2 commented Jun 24, 2024

This change is actually causing a failure to build the cubecell_board_v2 with the following error:

Compiling .pio/build/cubecell_board_v2/FrameworkArduino/basic.cpp.o
Compiling .pio/build/cubecell_board_v2/FrameworkArduino/board/board.c.o
/Users/nathoo/.platformio/packages/framework-arduinocubecell/cores/asr650x/SPI/SPI.cpp: In member function 'bool SPIClass::begin(int8_t, int8_t, int8_t, int8_t)':
/Users/nathoo/.platformio/packages/framework-arduinocubecell/cores/asr650x/SPI/SPI.cpp:53:9: error: 'SCK1' was not declared in this scope; did you mean 'SCK'?
   53 |   sck = SCK1;
      |         ^~~~
      |         SCK
/Users/nathoo/.platformio/packages/framework-arduinocubecell/cores/asr650x/SPI/SPI.cpp:54:10: error: 'MOSI1' was not declared in this scope; did you mean 'MOSI'?

The reason for this is the pin_arduino.h variant for the cubecell v2 does not include the SPI definitions.

You can reproduce this with the blink example and adding this target

[env:cubecell_board_v2]
platform = https://github.com/HelTecAutomation/heltec-cubecell.git 
framework = arduino
board = cubecell_board_v2

If I switch back to the currently release platform version 1.1.0 as of writing, then it compiles successfully. However it's using the wrong chip definition. This seems to be okay and the code flashes and runs as expected, but it's a bit sketchy.

@eiannone
Copy link
Contributor Author

@amirna2 , yes. Please see here: HelTecAutomation/CubeCell-Arduino@4918068
I'm not sure if its better to change pin map or update specific code.

@valeros
Copy link
Contributor

valeros commented Jun 26, 2024

Hi @amirna2, thanks for pointing it out. I believe the best solution would be asking @eiannone to submit a new PR with bugfix directly to the upstream Arduino core repository and then the maintainer @Heltec-Aaron-Lee could release a new version of the framework with the latest changes.

As a workaround you can manually declare missing pin definitions provided @eiannone directly in your platformio.ini:

[env:cubecell_board_v2]
platform = heltec-cubecell
framework = arduino
board = cubecell_board_v2
build_flags = 
    -DMOSI1=P4_0
    -DMISO1=P4_1
    -DSCK1=P4_2
    -DUART_RX2=P3_0
    -DUART_TX2=P3_1
    -DSDA1=P0_1
    -DSCL1=P0_0

@eiannone
Copy link
Contributor Author

Ok, PR added here: HelTecAutomation/CubeCell-Arduino#290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants