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

Platformio can't install platform #40

Open
albydnc opened this issue Jul 5, 2023 · 12 comments
Open

Platformio can't install platform #40

albydnc opened this issue Jul 5, 2023 · 12 comments

Comments

@albydnc
Copy link

albydnc commented Jul 5, 2023

Hello,

I have tried to install the platformio platform but I can't.

This is the error I get:

Tool Manager: Installing platformio/toolchain-gd32v @ ~9.2.0
Error: You do not have permission for this request
@Osirisoo0O
Copy link

Error: You do not have permission for this request

Because you can't find this package in PlatformIO Registry.
You can manually add this package.
image
image

@albydnc
Copy link
Author

albydnc commented Jul 10, 2023

pio platform install gd32v

WARNING: This command is deprecated and will be removed in the next releases. 
Please use `pio pkg install` instead.

Platform Manager: [email protected] is already installed
Tool Manager: Installing platformio/toolchain-gd32v @ ~9.2.0
HTTPClientError: You do not have permission for this request

even manually it does not work

@maxgerhardt
Copy link

@masebb
Copy link

masebb commented Sep 23, 2023

any update for this?

@RideMyByte
Copy link

it doesn't work for me either. after a few hours and lots of trying back and forth it still doesn't work... is there anyone with a workaround?
20 Longan Nanos arrived today xD

@masebb
Copy link

masebb commented Jan 7, 2024

I have temporally solution for this issue

There dependency files cant download from sipeed's server cause install error are almost found on sipeed's Sourceforge( https://sourceforge.net/projects/platformio-storage/files/packages/ )
so download it and to use @ to use local file in platformio.ini

platform_packages = framework-arduino-gd32v @ https://github.com/sipeed/Longduino.git
                    toolchain-gd32v @ file://.\files\toolchain-gd32v
                    tool-openocd-gd32v @ file://.\files\tool-openocd-gd32v
                    tool-gd32vflash @ file://.\files\tool-gd32vflash
Full platformio.ini worked in my env
[env:sipeed-longan-nano]
platform = gd32v
board = sipeed-longan-nano
framework = gd32vf103-sdk
platform_packages = framework-arduino-gd32v @ https://github.com/sipeed/Longduino.git
                    toolchain-gd32v @ file://.\files\toolchain-gd32v
                    tool-openocd-gd32v @ file://.\files\tool-openocd-gd32v
                    tool-gd32vflash @ file://.\files\tool-gd32vflash
upload_protocol = dfu

@RideMyByte
Copy link

Thank you very much for your answer!
That helps me a lot. I also had to integrate the framework locally.
Here is my version:

[env:sipeed-longan-nano]
platform = gd32v
board = sipeed-longan-nano
framework = gd32vf103-sdk @ file://lib\framework-gd32vf103-sdk
platform_packages = framework-arduino-gd32v @ https://github.com/sipeed/Longduino.git
                    toolchain-gd32v @ file://lib\toolchain-gd32v-windows_x86-9.2.0
                    tool-openocd-gd32v @ file://lib\tool-openocd-gd32v-windows_x86-0.1.1
                    tool-gd32vflash @ file://lib\tool-gd32vflash-windows-0.1.0
upload_protocol = dfu

However, it still throws this error:
MissingPackageManifestError: Could not find one of 'library.json, library.properties, module.json' manifest files in the package

I am trying to debug the following project:
https://github.com/vonkonow/LEET-Modular

Many thanks and best regards
Mario

@maxgerhardt
Copy link

Do not put it in the lib/ folder of the project, create a new folder for it (e.g. packages) and reference that path. lib/ is for libraries, not packages.

@RideMyByte
Copy link

Super nice of you to help so quickly :)
now that the libs are in a different folder, I no longer get the error :)
But a new one:
Error: This board doesn't support gd32vf103-sdk @ https://github.com/RideMyByte/GD32VF103_Firmware_Library.git framework!

My platformio.ini looks like this:

[env:sipeed-longan-nano]
platform = gd32v
board = sipeed-longan-nano
framework = gd32vf103-sdk @ https://github.com/RideMyByte/GD32VF103_Firmware_Library.git
platform_packages = 
	framework-arduino-gd32v @ https://github.com/sipeed/Longduino.git
	toolchain-gd32v @ file://packages\toolchain-gd32v-windows_x86-9.2.0
	tool-openocd-gd32v @ file://packages\tool-openocd-gd32v-windows_x86-0.1.1
	tool-gd32vflash @ file://packages\tool-gd32vflash-windows-0.1.0
upload_protocol = dfu

Is this perhaps the wrong framework? I have forked it and added the package.json:
package.json

If any of you still have the "gd32vf103-sdk" installed, could you upload the folder as a zip? or are there sources on the web?

Best regards and many thanks!

@maxgerhardt
Copy link

framework = gd32vf103-sdk @ https://github.com/RideMyByte/GD32VF103_Firmware_Library.git

That is not valid. The framework can only be the principal value, like gd32vf103-sdk, arduino, et cetara. Per

"framework-gd32vf103-sdk": {
"optional": true,
"type": "framework",
"owner": "platformio",
"version": "~1.0.0"
},

the package for it is called framework-gd32vf103-sdk and you should add your custom source for it in the platform_packages list. If you use that framework, you may also not need framework-arduino-gd32v.

@RideMyByte
Copy link

Okay. Many, many hours later.

The Platformio.ini works, I have placed the firmware and co in the "package" folder.
In the C compiler I have entered ${workspaceFolder}/packages/**. Before I had the error that "gd32vf103.h" was not found. Now the file is found and included.

At the end of "gd32vf103.h" is written:
#include "gd32vf103_libopt.h"

This file is located in "packages\framework-gd32vf103-sdk\Examples\ADC\ADC0_ADC1_regular_parallel".
Because I recursively include the workspace folder above and the examples are also in the package folder, VSC does not issue an error.
If I then click "Start Debugging", the following errors appear:

Processing sipeed-longan-nano (platform: gd32v; board: sipeed-longan-nano; framework: gd32vf103-sdk)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/gd32v/sipeed-longan-nano.html
PLATFORM: GigaDevice GD32V (1.3.0+sha.25c97ad) > Sipeed Longan Nano
HARDWARE: GD32VF103CBT6 108MHz, 32KB RAM, 128KB Flash
DEBUG: Current (altera-usb-blaster) External (altera-usb-blaster, gd-link, jlink, rv-link, sipeed-rv-debugger, um232h)
PACKAGES: 
 - framework-gd32vf103-sdk @ 1.0.1+sha.3d0e2a7 
 - tool-dfuutil @ 1.11.0 
 - tool-gd32vflash @ 0.1.0 
 - tool-openocd-gd32v @ 0.1.1 
 - toolchain-gd32v @ 9.2.0
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in debug mode
Compiling .pio\build\sipeed-longan-nano\src\data\font.o
Compiling .pio\build\sipeed-longan-nano\src\data\frequency.o
Compiling .pio\build\sipeed-longan-nano\src\data\images.o
Compiling .pio\build\sipeed-longan-nano\src\drivers\SysTick.o
Compiling .pio\build\sipeed-longan-nano\src\drivers\adc.o
Compiling .pio\build\sipeed-longan-nano\src\drivers\display.o
Compiling .pio\build\sipeed-longan-nano\src\drivers\encoder.o
Compiling .pio\build\sipeed-longan-nano\src\drivers\spi.o
Compiling .pio\build\sipeed-longan-nano\src\drivers\timer.o
Compiling .pio\build\sipeed-longan-nano\src\drivers\usbfs\drv_usb_core.o
Compiling .pio\build\sipeed-longan-nano\src\drivers\usbfs\drv_usb_dev.o
In file included from src\data\font.cpp:3:
C:\Users\Mario\.platformio\packages\framework-gd32vf103-sdk\GD32VF103_standard_peripheral/gd32vf103.h:239:10: fatal error: gd32vf103_libopt.h: No such file or directory

The _libopt.h is not found. VSC obviously recognizes the files.
I do not understand it.

I think I'm slowly giving up :-D
Too bad. I have enough hardware flying around to build 20 synthesizers and give them away... well... maybe someday when I understand it...

If someone knows how to do it, I would be very happy...

best regards
Mario

@maxgerhardt
Copy link

gd32vf103_libopt.h

That file is a a standard file that includes the activated SPL modules, or, just all of them. You can just copy-paste gd32vf103_libopt.h into the include/ folder of your project and add build_flags = -Iinclude to the platformio.ini for it to be able to be found.

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

No branches or pull requests

5 participants