Closed TakaTamaki0914 closed 4 months ago
Hi @TakaTamaki0914
Currently, Milkv Duo Arduino doesn't support Arduino IDE 1.8.x. Strongly recommend using the 2.3.x version. The JSON file has some known issues on Arduino IDE 1.8.x: such as https://github.com/milkv-duo/duo-arduino/issues/8, issue 11 is similar to it. These will be fixed in the next version. Thank you.
Hi @shiptux and @TakaTamaki0914
Although I have used Arduino IDE 2.3.2, I faced the same problem as him.
python3 "/Users/username/Library/Arduino15/packages/sophgo/tools/burntool_py/0.2/burntool" -p "/dev/cu.usbmodem01234567893" -f /private/var/folders/1p/cknff7js1mz1py52h64x0czr0000gn/T/arduino/sketches/F79F505DEBEE1A80980DDC12F784F26D/led_test.ino.elf
/Users/username/.pyenv/versions/3.12.3/bin/python3: can't open file '/Users/username/Library/Arduino15/packages/sophgo/tools/burntool_py/0.2/burntool': [Errno 2] No such file or directory
Failed uploading: uploading error: exit status 2
The error is a little different from #8, I think.
His error says .../burntool_py/0.2/burntool
was not found.
@TakaTamaki0914 shows us that adding ".py" will be a way to solve it. I can upload my program to duo256 with his solution.
My development environment is shown below.
thanks,
@Gitefu
The error is a little different from https://github.com/milkv-duo/duo-arduino/issues/8, I think. https://github.com/milkv-duo/duo-arduino/issues/8 says that "pyserial" module was not found. His error says .../burntool_py/0.2/burntool was not found.
Sorry, there is a mistake here, the example that I want to show is https://github.com/milkv-duo/duo-arduino/issues/7. But this issue is different from yours too.
So this is a new issue, also should be fixed in the next version.
Thanks.
@shiptux
Thank you for checking it.
In platform.txt
, the 110th line is tools.burntool_py.cmd=burntool
.
https://github.com/milkv-duo/duo-arduino/blob/b0c727e81fb25ea936ba37c58d98e0c4c58ccadb/platform.txt#L107-L112
To fix the bug, I think that .py
has to be added to the prefix of the 110th line like tools.burntool_py.cmd=burntool.py
.
I found this way, but I don't know how to build package_sg200x_index.json
...
If the problem has not yet been solved,
could you try this idea?
or could you tell us how to build package_sg200x_index.json
?
thanks
@Gitefu @TakaTamaki0914
This issue was caused by https://github.com/milkv-duo/duo-arduino/blob/dev/platform.txt#L113. Here should define burntool.py for MacOS, but it didn't. This will be updated in the next version. If you want to fix it locally. You can try to add the definition to your file.
This information I just want to send, but I forgot. After my dinner, you find the same place. LOL...
To fix the bug, I think that .py has to be added to the prefix of the 110th line like tools.burntool_py.cmd=burntool.py. I found this way, but I don't know how to build package_sg200x_index.json...
If the problem has not yet been solved, could you try this idea? or could you tell us how to build package_sg200x_index.json?
A simple way is to add "tools.burntool_py.cmd.macos=burntool.py" at platform.txt. You can change this locally (Arduino installed location)
Or:
The JSON file can be generated by package/release.sh. But I don't recommend using it. Because it has some known issues.
Thanks.
@shiptux
I see. I'll try to launch a local HTTP server and fix the JSON file manually.
thanks,
@shiptux
I see. I'll try to launch a local HTTP server and fix the JSON file manually.
thanks,
Don't forget to update the version. Otherwise, you will need to remove the board info first.
@shiptux
I succeeded in uploading my program to a duo-256m from Arduino IDE after adding .py
to the 110th line of duo-arduino/platform.txt
.
Should I issue a pull request?
/Users/username/Library/Arduino15/packages/sophgo/tools/xpack-riscv-none-elf-gcc/13.2.0-2/bin/riscv-none-elf-objcopy -O binary /private/var/folders/1p/cknff7js1mz1py52h64x0czr0000gn/T/arduino/sketches/F79F505DEBEE1A80980DDC12F784F26D/led_test.ino.elf /private/var/folders/1p/cknff7js1mz1py52h64x0czr0000gn/T/arduino/sketches/F79F505DEBEE1A80980DDC12F784F26D/led_test.ino.bin
/Users/username/Library/Arduino15/packages/sophgo/tools/xpack-riscv-none-elf-gcc/13.2.0-2/bin/riscv-none-elf-objcopy -O ihex -R .eeprom /private/var/folders/1p/cknff7js1mz1py52h64x0czr0000gn/T/arduino/sketches/F79F505DEBEE1A80980DDC12F784F26D/led_test.ino.elf /private/var/folders/1p/cknff7js1mz1py52h64x0czr0000gn/T/arduino/sketches/F79F505DEBEE1A80980DDC12F784F26D/led_test.ino.hex
python3 "/Users/username/Library/Arduino15/packages/sophgo/tools/burntool_py/0.2/burntool.py" -p "/dev/cu.usbmodem01234567893" -f /private/var/folders/1p/cknff7js1mz1py52h64x0czr0000gn/T/arduino/sketches/F79F505DEBEE1A80980DDC12F784F26D/led_test.ino.elf
burntool.py v0.3
upload firmware /private/var/folders/1p/cknff7js1mz1py52h64x0czr0000gn/T/arduino/sketches/F79F505DEBEE1A80980DDC12F784F26D/led_test.ino.elf
start upload...
communication and testing...
connecting...
connection successful...
stop firmware...
ready to update firmware...
start to update firmware...
send data... 10.00%
send data... 20.00%
send data... 30.00%
send data... 40.00%
send data... 50.00%
send data... 60.00%
send data... 70.00%
send data... 80.00%
send data... 90.00%
send data... 100.00%
update firmware done...
restart firmware...
upload and runing success...
To debug on my local environment, I did the below works.
.py
to the prefix of the 110th line of platform.txt
like tools.burntool_py.cmd=burntool.py
.0.2.4
in Version
, package.json
and package/package_sg200x_index.template.json
arduino-soghgo.zip
shasum -a 256 arduino-sophgo.zip
package/package_sg200x_index.template.json
to the new SHA256 checksumpython -m http.server 80
in my home directoryhttp://127.0.0.1/duo-arduino-dev/package/package_sg200x_index.template.json
Maybe, when uploading a program to duo-256m for the first time, an error about the size of the zip occurs.
Then the 20th line of package/package_sg200x_index.template.json
has to be replaced to the correct size.
After replacing that, you should retry from the 8th process.
thanks,
@carbonfix @shiptux I issued the PR #12. Would you review it?
thanks
@carbonfix @shiptux I issued the PR #12. Would you review it?
thanks
LGTM, but this PR should be approved by Carbonfix.
Hi @shiptux, Thank you for the review!
@carbonfix, I would appreciate it if you could check the PR #12 whenever you have time.
Best,
Hi @carbonfix, Thank you for merging the PR.
@carbonfix @shiptux ,
After replacing a json link of Arduino IDE with the json url released as new, the same issue occurs...
In the 17th - 20th lines of package_sg200x_index.json of the "config" tag, the zip file params are not changed to config
from V1.0.0
.
"url": "https://github.com/milkv-duo/duo-arduino/releases/download/V1.0.0/arduino-sophgo.zip",
"archiveFileName": "arduino-sophgo.zip",
"checksum": "SHA-256:225ff6e17133ac1c8b71a3a198343f6d8576c0cfab211129bddb6f0f42f917ec",
"size": "628119",
If you have time, could you check it?
Best,
@carbonfix @shiptux ,
After replacing a json link of Arduino IDE with the json url released as new, the same issue occurs...
In the 17th - 20th lines of package_sg200x_index.json of the "config" tag, the zip file params are not changed to
config
fromV1.0.0
."url": "https://github.com/milkv-duo/duo-arduino/releases/download/V1.0.0/arduino-sophgo.zip", "archiveFileName": "arduino-sophgo.zip", "checksum": "SHA-256:225ff6e17133ac1c8b71a3a198343f6d8576c0cfab211129bddb6f0f42f917ec", "size": "628119",
If you have time, could you check it?
Best,
Here is a PR to generate JSON from GitHub Action: https://github.com/milkv-duo/duo-arduino/pull/15. The problem should be fixed after this PR is merged.
Thanks.
@shiptux @carbonfix I see! I didn't know that PR was already issued.
After a new JSON is released, I'll try to upload a program from my Mac.
Thanks,
Hi @shiptux @carbonfix,
Uploading the program to Duo 256m was succeeded with the new release! https://github.com/milkv-duo/duo-arduino/releases/tag/v0.2.4
Can I close this issue?
Best,
Hi @shiptux @carbonfix,
Uploading the program to Duo 256m was succeeded with the new release! https://github.com/milkv-duo/duo-arduino/releases/tag/v0.2.4
Can I close this issue?
Best,
Thank you for your test. Please feel free to close it.
Hi @shiptux Sorry, I noticed that I don't have the authority to close this :)
Could you close this?
Hi @shiptux Sorry, I noticed that I don't have the authority to close this :)
Could you close this?
Hi, @Gitefu
I don't have the authority, too. @carbonfix Could you please close this?
Development Environment
Error
When I tried to upload a program to my Duo256 Dev module, the below errors occur.
My Solution
After compiling, I can upload the program with the below command.(the command was added only ".py")
However I tried to issue the PR of this solution, I don't know how to generate
package_sg200x_index.json
.@carbonfix, would you solve the problem?
Best regards,