arduino12 / n76e003_platformio

Nuvoton MCUs (N76E003) example project with PlatformIO
13 stars 12 forks source link

platform.json is missing. #1

Open Dev991 opened 3 years ago

Dev991 commented 3 years ago

Platform Manager: Installing file://D:\GitHub\n76e003_platformio Error: Could not find one of 'platform.json' manifest files in the package

arduino12 commented 3 years ago

Will need more details...

Dev991 commented 3 years ago

I am not sure if I am trying to use it the correct way. Here is what I did.

I cloned the repository to my local disk. In PlatformIO extension in VS code, I selected Platforms and chose Advanced Installation. I provided the path to my local repository and clicked install, and got this error.

If I open the copied repository folder as a project in PlatformIO and build, I get same error about missing platform.json

arduino12 commented 3 years ago

I made this repo as POC - because this is not the right and best way to do it.... Sadly pio develop team did not support this MCU... No need to install this repo.. this repo is just a pio project file.. Please follow the "Getting Started" section in the README :) You may need to install a platform with SDCC like stm8 or something because this code relying on it.. Good luck - and please share the final steps you did if it works for you so others may use it as well- (I will be very busy next month so no time to play with it..)

Dev991 commented 3 years ago

I will be glad to test it. I already have CMAKE in my PATH. Other C/C++ projects for Rpi pico and ESP32 dev boards build and flash just fine from PlatformIO using arduino framework.

I followed the steps in README as I understood, however it would be great if you could list the steps to follow after the cloning step, in just a little bit more detail or give me some leads to follow to remove this platform.json error, as mentioned in my last reply.

Thanks.

arduino12 commented 3 years ago

Thanks for the help, I just rememberd that in the ini file, I used my own clone of the mcs51 platform and found the json file that is missing for you :) So I think you should install this mcs51 platform and see if it helps- I think that the SDCC is included inside it as well :)

Dev991 commented 3 years ago

Thanks for taking time out to link required resources.

I updated the resources and project built just fine.

As I am absolutely new to PlatformIO and VS code, I wanted to repeat the process to get the steps right. I remove the project and platform and cloned the repo again. And again, it would not build.

Seems like versions of installed components make the difference. So not everyone is likely to face same problems as I did.

Spent a day exploring the PlatformIO ecosystem. Added 'build_type = debug' to platformio.ini Learnt that I can safely ignore - 'Unable to resolve configuration with compilerPath "C:/Users/User/.platformio/packages/toolchain-sdcc/bin/sdcc.exe". Using "cl.exe" instead.', and all the the messages in Problems section like 'identifier P0M1 is undefined'.

Then I was getting error related to archiving of library. Finally solved by adding 'lib_archive = false' to platformio.ini Now able to build and flash the project.

POC validated. One might not need to pay for Keil professional license to overcome 2K code limit, if this is taken to its logical end.

arduino12 commented 3 years ago

Thanks for sharing! @Dev991 I will leave this issue open so others can use it if needed... On my PC (Win 10) the original example works fine (without changing the .pio file as you did)- And also prints this log record that I ignored as well: [17.7.2021, 14:24:10] Unable to resolve configuration with compilerPath "C:/Users/User/.platformio/packages/toolchain-sdcc@1.30804.10766/bin/sdcc.exe". Using "cl.exe" instead.

Hope I get the time to test this on a new PC to see if I missed a step in the installation guide list and to add more code examples :)