Comments (4)
Thanks for reporting this.
It appears to be an issue with libopencm32. Specifically, the usbd_poll()
function -- if you disable the USB ISR, it works just fine.
I'm without my debugger right now, so I'll see how much debugging I can do. It certainly feels like 18.04 got aggressive when it comes to packing, and maybe some struct got not-word-aligned.
from tomu-quickstart.
Ubuntu 18.04 is completely broken.
Their memcpy()
jumps to an address that doesn't exist:
xobs@Pazuzu:~/Code/Tomu/quickstart/usb-hid$ gdb-multiarch usb-hid.elf
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from usb-hid.elf...done.
(gdb) disassemble memcpy,+4
Dump of assembler code from 0x5950 to 0x5954:
0x00005950 <memcpy+0>: movs r7, r1
0x00005952 <memcpy+2>: b.n 0x5ffa
End of assembler dump.
(gdb) x 0x5ffa
0x5ffa: Cannot access memory at address 0x5ffa
(gdb)
You may need to try a different compiler.
from tomu-quickstart.
Upstream bug: https://bugs.launchpad.net/ubuntu/+source/gcc-arm-none-eabi/+bug/1767223
The issue is that it's ignoring the -mcpu=cortex-m0plus
and linking in the desktop version of libc, which contains ARM instructions. The Cortex M-series only supports Thumb2 instructions, so any time you call any standard library function the program will crash.
from tomu-quickstart.
Workaround to fix the issue on Ubuntu 18.04 LTS (courtesy of @madhacker on #tomu): bbcmicrobit/micropython#514 (comment)
from tomu-quickstart.
Related Issues (20)
- HID Keyboard example? HOT 6
- quickstart documentation should contain links on the programming API HOT 6
- Documentation Enhancement: Install Arm Embedded Toolchain on macOS with homebrew
- Unable to compile U2F (chopstx) HOT 2
- gpg? HOT 1
- Solid Red light HOT 3
- cbmbasic loaded onto tomu freezes after first keystroke HOT 3
- Inconsistently loading new code HOT 6
- Can't get U2F working HOT 2
- program persistence after unplugging HOT 1
- TOBOOT_CONFIG_FLAG_AUTORUN HOT 4
- brew install dfu-util HOT 1
- Windows 10 wont recognize USB examples HOT 1
- Clarify documentation in readme.md HOT 1
- RFC: mass storage with write support HOT 1
- Issue uploading to tomu HOT 5
- arm-none-eabi/bin/ld: cannot find -lstdc++ error when running make HOT 1
- enhancement: add usb multiplexing sample HOT 1
- Question for HID keyboard example HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tomu-quickstart.