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

Importer doesn't use correct bootloader image for Fubarino Mini #15

Closed
EmbeddedMan opened this issue Apr 23, 2017 · 18 comments
Closed

Importer doesn't use correct bootloader image for Fubarino Mini #15

EmbeddedMan opened this issue Apr 23, 2017 · 18 comments
Assignees
Labels

Comments

@EmbeddedMan
Copy link
Member

I believe that the importer is choosing the "Fubarino-Mini_USB.hex" bootloader hex when it needs to program a Fubarino Mini's bootloader. However, the proper one is "Fubarino-Mini_USB_48MHz.hex".

The only real difference is that the Fubarino-Mini_USB.hex runs the core clock at 40MHz, whereas the Fubarino-Mini_USB_48MHz.hex runs it at 48MHz. I'm pretty sure that Fubarino-Mini_USB_48MHz.hex is what comes on the board from the factory.

This was likely a screw up on my part when we were deciding what hex files go with what boards.

@EmbeddedMan
Copy link
Member Author

Note this is with importer v1.0.0

@EmbeddedMan
Copy link
Member Author

Ping - any chance this could be fixed and a new importer released? This bug causes all Fubarino Mini debug sessions to result in a Fubarino Mini that is functional, but all timing related operations are off. Baud rates are not accurate, delays are not correct, etc. (Because the code things that the core is running at 48Mhz, but it's actually at 40MHz).

@gholdys
Copy link
Collaborator

gholdys commented May 4, 2017

Sure. I wanted to bundle some issues into version 1.0.1 but I guess I can fix this bug and maybe add few "enhancements".

@EmbeddedMan
Copy link
Member Author

EmbeddedMan commented May 4, 2017 via email

@gholdys
Copy link
Collaborator

gholdys commented May 4, 2017

Just committed version 1.0.1. Please verify if this issue has been successfully resolved.

@EmbeddedMan
Copy link
Member Author

EmbeddedMan commented May 5, 2017 via email

@gholdys
Copy link
Collaborator

gholdys commented May 5, 2017

The problem seems to be Windows-related. I've tried to reproduce your error on my Linux box and could not do that - no matter which mode of import I used or which configuration, the build always was successful. However, when I switched to Windows and tried to import and build your code, I immediately got the error with missing SPI.o.d. I'm still investigating this issue...

@EmbeddedMan
Copy link
Member Author

EmbeddedMan commented May 5, 2017 via email

@gholdys
Copy link
Collaborator

gholdys commented May 5, 2017

I confirmed that the problem is with relative paths to library and source files. When the paths are absolute, the build works fine.

@gholdys
Copy link
Collaborator

gholdys commented May 5, 2017

The problem is in the "slashes" on Windows (surprise, surprise). It turns out that MPLAB X on Windows actually expects Unix-like slashes in relative paths. When I removed the SPI files and the project source file from the project and added from the context menu, everything started to work fine.

@gholdys
Copy link
Collaborator

gholdys commented May 11, 2017

The issue with wrong slashes on Windows has been fixed in version 1.0.3 (available on GitHub and soon in plugin repository). Please verify.

@EmbeddedMan
Copy link
Member Author

OK, so v1.0.3 works for me, in that it compiles and downloads just fine now. (Thank you!) However, it appears the wrong bootloader is still being used for Fubarino Mini when programming the debug build (i.e. to restore the bootloader.) It is still running the core at 40Mhz rather than 48MHz.

@gholdys
Copy link
Collaborator

gholdys commented May 12, 2017

There are two versions of Fubarino Mini: fubarino_mini_dev that uses Fubarino-Mini_USB_48MHz.hex and fubarino_mini that is mapped to Fubarino-Mini.hex. If both versions should use the 48MHz bootloader then what is the point of the other .hex file?

@EmbeddedMan
Copy link
Member Author

EmbeddedMan commented May 12, 2017 via email

@lstandage
Copy link

lstandage commented May 15, 2017 via email

@EmbeddedMan
Copy link
Member Author

Larry, there isn't an attachment on your github message. Do you want to send it to me privately?

@gholdys
Copy link
Collaborator

gholdys commented May 17, 2017

@EmbeddedMan, I've just uploaded version 1.0.4 with the new linker script for Fubarino Mini. Please verify if it works well.

@EmbeddedMan
Copy link
Member Author

I have confirmed that this bug is fixed in v1.0.4

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

No branches or pull requests

3 participants