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

read_short() wrong index for terminating 0 #19

Open
limpkin opened this issue Oct 19, 2016 · 4 comments
Open

read_short() wrong index for terminating 0 #19

limpkin opened this issue Oct 19, 2016 · 4 comments

Comments

@limpkin
Copy link

limpkin commented Oct 19, 2016

https://github.com/signal11/m-stack/blob/master/apps/bootloader/software/hex.c#L97

should be changed to chars[4] = '\0';

the indexes 0 1 2 3 will contain the relevant data

@signal11
Copy link
Owner

Thanks for the find. There is actually at least one more of those in there I recently found on a derivative project but haven't pushed to master yet. Sorry about that. I'll push them soon.

@limpkin
Copy link
Author

limpkin commented Oct 20, 2016

you're welcome! no worries...
I'm trying to port your bootloader to a PIC24FJ256GB110 but unfortunately the USB doesn't enumerate. Do you know if this has already been done before?
Thanks!

@signal11
Copy link
Owner

USB not enumerating is almost always because the oscillator is not correct.

Are you using an internal oscillator (not sure if this device supports it for USB)? Some of those PIC24 parts have oscillators that will run at 4 or 8 MHz, and it's not entirely clear in the main oscillator diagram which is used by default and that it can be switched.

@limpkin
Copy link
Author

limpkin commented Oct 20, 2016

actually it turned out to be a linker script problem!
Currently trying to change my linker scripts accordingly.

Planet911 pushed a commit to Planet911/m-stack that referenced this issue Dec 6, 2020
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

2 participants