Closed vishnumaiea closed 2 years ago
Hi,
Did you follow these steps? I just cloned this repo and the project compiles without a problem (WIN10):
Make sure you have added the whole folder to VS code like I just did :)
Let us know how you solve it so others can learn!
Yes, I followed the steps you have given and opened the whole folder as a PlatformIO project. The whole window looks like this.
But I am on Windows 11. Not sure if that's supposed to cause any issues.
Strange.. Anyway the code thats get compiled is on /src/main.c not the /lib/examples/*, Only different I see is the sdcc toolchain version, maybe try runing pio update and upgrate..
That was a helpful clue. I had updated all PIO packages and also the core. It did not help. Then I uninstalled and re-installed the Intel MCS-51 platform. But that did not work either. What I found is that the default SDCC compiler toolchain used by PIO is v3.8.4. That was causing the issue.
The latest supported version is v4.1.0 as described here on the PIO website - https://registry.platformio.org/tools/platformio/toolchain-sdcc/installation
So I just had to copy the version string platformio/toolchain-sdcc@^1.30901.11242 to the platformio.ini file.
PIO installed the new dependencies and the file got compiled successfully.
Processing n76e003 (platform: https://github.com/arduino12/platform-intel_mcs51.git; board: n76e003)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/intel_mcs51/n76e003.html
PLATFORM: Intel MCS-51 (8051) (1.2.3+sha.2d7556b) > Generic N76E003
HARDWARE: N76E003 16MHz, 1KB RAM, 18KB Flash
PACKAGES:
- tool-stcgal 1.104.0 (1.4)
- toolchain-sdcc 1.40100.12072 (4.1.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 1 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <N76E003>
Building in release mode
Compiling .pio\build\n76e003\src\main.rel
Compiling .pio\build\n76e003\lib634\N76E003\Common.rel
Compiling .pio\build\n76e003\lib634\N76E003\Delay.rel
Archiving .pio\build\n76e003\lib634\libN76E003.lib
Indexing .pio\build\n76e003\lib634\libN76E003.lib
Linking .pio\build\n76e003\firmware.hex
Checking size .pio\build\n76e003\firmware.hex
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Flash: [ ] 3.2% (used 582 bytes from 18432 bytes)
==================================================================== [SUCCESS] Took 3.15 seconds ====================================================================
Terminal will be reused by tasks, press any key to close it.
Thank you for your help, and thank you for making the effort to add NE76E003 to PIO environment 💛
Amazing! apparently I did similar version fix but forgot to commit it to my platform-intel_mcs51 fork!🤯
Now it is pushed to my fork - so should work out of the box-
if you can also verify it works (without the added .pio platform_packages = platformio/toolchain-sdcc@^1.30901.11242
) will be great!
Thanks and have a great time playing with this MCU🤗!
Sure I'll test that 😀
Yes, adding a more recent version string to the platform.json of MCS-51 platform works.
Great, thanks!
I was trying to compile your examples without any modifications. But the compilation fails with a few error messages.
I have the MCS-51 toolchain installed. The N76E003.h is the only file with errors and warnings. Am I missing something here?
Below is the log from terminal window.