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

Added a example serial terminal program for Linux #215

Merged
merged 1 commit into from
Nov 22, 2021
Merged

Added a example serial terminal program for Linux #215

merged 1 commit into from
Nov 22, 2021

Conversation

mariohoff
Copy link
Contributor

Tried the example first with minicom, which didn't get the bootloader interrupt in the beginning. Somehow I couldn't figure out uploading files with screen either. GTKTerm seems to work perfectly fine. Maybe this saves someone else 10-30 minutes of searching.

Also fixed a minor typo in the preceding sentence.

…nd files.

Also fixed a minor typo in the preceding sentence.
@stnolting
Copy link
Owner

Good Idea! Thanks for contributing! 👍

Btw, great timing! 😉
We just had the same issue with minicom on gitter https://gitter.im/neorv32/community?source=orgpage

@stnolting stnolting added the DOC Improvements or additions to documentation label Nov 22, 2021
@stnolting stnolting merged commit 288bb13 into stnolting:master Nov 22, 2021
@hipolitoguzman
Copy link
Contributor

hipolitoguzman commented Nov 22, 2021

I have seen the same problem with minicom with the neorv32 in the iCEBreaker board. Minicom seems to corrupt any program bigger than 4k in size when uploading it to the bootloader. But when using a different terminal program, such as cutecom, everything works as expected.

It may be that the 'ascii' mode of minicom (which is the one that I was using) is corrupting the files? Minicom doesn't seem to have, by default, a 'binary' transfer mode. I can see here some files that allow to add this binary mode to minicom, but I haven't tried them: https://gist.github.com/cstrahan/5796653

@mariohoff
Copy link
Contributor Author

mariohoff commented Nov 22, 2021

Looks like my pull request was a bit quick. But thanks for merging anyways!
GTKTerm works perfectly fine, but only for the blinky sketch, which is under 4k of size. Everything bigger than that fails because GTKTerm has this size limit for whatever reason here:
https://github.com/Jeija/gtkterm/blob/c14db185e93aa186db790cec58af3ec99b4f2459/src/serial.h#L32

I just downloaded GTKTerm and set that to and arbitrary value like
#define BUFFER_EMISSION (4096*8)
and then compiled it myself. This works fine. Maybe there is a better program somewhere for linux (or we fix GTKTerm)... i don't know

@stnolting
Copy link
Owner

It's good to have a Linux-world example for one terminal application. So I think it's fine to have that in the docs.

Maybe it is not the best idea to use the "raw" data mode to send the executable... I was thinking about implementing an actual terminal protocol like XMODEM, which is supported by a wide range of terminal applications. But I am not sure about that.

Anyway, maybe we should add a node regarding this buffer size issue to the documentation.

@msaufyrohmad
Copy link

do this problem with minicom solved? i also having ERR_CHKS on binary more than 4kb

@stnolting
Copy link
Owner

Hey @msaufyrohmad!

I do not think this problem is solved - at least not on the minicom side. Hence, I highly recommend to use a different terminal program. Luckily, there are lots of them out there. 😉

@msaufyrohmad
Copy link

msaufyrohmad commented May 31, 2023 via email

@stnolting
Copy link
Owner

Very good choice 😉

@mlapaj
Copy link

mlapaj commented Nov 27, 2023

I'm using Linux Picocom program
My shell command is (maybe someone else will be intrested):
sudo picocom /dev/ttyUSBx -b 19200 --send-cmd="ascii-xfr -s -n"
To send file you need to press ctrl+a and then ctrl+s and type file name.
Using this method, I have uploaded hello app and successfully executed it.

One more thing:
I spent a lot of time with getting ERR_EXE. I thought that issue is with terminal. Ultimately, I realized that I`m loading wrong binary file (main.bin instead of neorv32_raw_exe.bin) . My suggestion is to mention something about it in guide and also in datasheet where ERR_EXE is described (for example to check if header magic is correct). It will reduce time on investigation whats wrong.

Anyway, i have successfully ran hello world example.
Thanks Stnolting for this project.

@stnolting
Copy link
Owner

Thanks for the information!

My suggestion is to mention something about it in guide and also in datasheet where ERR_EXE is described (for example to check if header magic is correct). It will reduce time on investigation whats wrong.

Good point. I know that quite a lot people struggle with this (myself included) 😅

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

Successfully merging this pull request may close these issues.

None yet

5 participants