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 binary not working but mbed build works #91

Closed
danielkucera opened this Issue Mar 5, 2018 · 3 comments

Comments

Projects
None yet
1 participant
@danielkucera

danielkucera commented Mar 5, 2018

I'm building simple USB keyboard app. If I upload to my device binary build from https://os.mbed.com/users/danman/code/STM32F103C8T6_USBKeyboard/ for NUCLEO-F103RB
it works ok.

But if I build one from here: https://github.com/danielkucera/stm32-usbkeyboard
where the main.cpp is exactly the same, it doesn't work.

Also the resulting binary is much smaller:

-rwxrwxr-x 1 danman danman 30K Mar 5 17:50 .pioenvs/nucleo_f103rb/firmware.bin
vs.
-rw-rw-r-- 1 danman danman 32K Mar 5 17:45 STM32F103C8T6_USBKeyboard.NUCLEO_F103RB.bin

What am I doing wrong?

@danielkucera

This comment has been minimized.

danielkucera commented Mar 5, 2018

If I comment out all lines with keyboard, it blinks without any problem. I suspect the USB library is not linked in.

@danielkucera

This comment has been minimized.

danielkucera commented Mar 5, 2018

Ok, I've found the problem. I've had to checkout specific USBDevice driver lib like this:

$ cd lib
$ hg clone https://danman@os.mbed.com/users/hudakz/code/USBDevice_STM32F103/
destination directory: USBDevice_STM32F103
requesting all changes
adding changesets
adding manifests
adding file changes
added 68 changesets with 274 changes to 93 files
updating to branch default
31 files updated, 0 files merged, 0 files removed, 0 files unresolved
@danielkucera

This comment has been minimized.

danielkucera commented Mar 5, 2018

or better by following line in platformio.ini

lib_deps = https://os.mbed.com/users/hudakz/code/USBDevice_STM32F103/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment