Comments (3)
I have fixed compilation errors by changingfile: syscallgo-noos+.h. I have replaced inline void internal$NewTask(void (*f) (), bool lock)
with inline __attribute__((always_inline)) void internal$NewTask(void (*f) (), bool lock)
like you did for other inline functions.
I don't know however if it doesn't break something else but I will confirm it tomorrow.
from emgo.
Hmm. I need to review this.
I tried compile your code on my system:
$ EGOS=noos EGARCH=cortexm4f EGTARGET=l476xx egc
$ arm-none-eabi-size cortexm4f.elf
text data bss dec hex filename
31812 324 348 32484 7ee4 cortexm4f.elf
This is real output for your main.go and script.ld.
Ensure that EGOS=noos and EGCC, EGLD, EGAR points to arm-none-eabi binaries and EGROOT, EGPATH are set correctly.
Regarding SWO, you have a bug in your code. You call system.Setup two times. I don't know what this causes but LED blinks. Comment the line:
system.SetupMSI(100)
and compile the program again. After that, load it with this magic command (you need itmsplit on your path):
$ openocd -d0 -f interface/stlink.cfg -f target/stm32l4x.cfg -c 'init; reset init; program cortexm4f.elf; tpiu config internal /dev/stdout uart off 80000000; itm ports on; reset run' |itmsplit /dev/stdout
This is what load-oocd.sh script does for this specific case (board, speed, etc). And there is its output:
Open On-Chip Debugger 0.10.0+dev-00319-g8f1f912a (2018-03-07-19:20)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
adapter speed: 500 kHz
adapter_nsrst_delay: 100
none separate
adapter speed: 480 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080051b0 msp: 0x20003480
adapter speed: 4000 kHz
adapter speed: 480 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080051b0 msp: 0x20003480
adapter speed: 4000 kHz
** Programming Started **
auto erase enabled
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x20000050 msp: 0x20003480
wrote 32768 bytes from file cortexm4f.elf in 1.551383s (20.627 KiB/s)
** Programming Finished **
adapter speed: 480 kHz
Core: 80000000 Hz
AHB: 80000000 Hz
APB1: 80000000 Hz
APB2: 80000000 Hz
from emgo.
You're right with always_inline. Virtually any inline directive in any *+.h file must have this attribute or be static inline. I've used find and grep to find such bugs and found three. All fixed in last commit.
from emgo.
Related Issues (20)
- how could I port it to arm a53 HOT 2
- STM32 WiFi support HOT 2
- ESP8266 HOT 1
- Support for SVD files HOT 4
- How does it work, rationale, technical guide? HOT 2
- how to use xgen HOT 3
- how to use bluetooth protocol stack HOT 4
- how can i use TCP stack? HOT 1
- wasm targets HOT 3
- Question: Whad do you thing about tinygo? HOT 1
- Nucleo l073rz possible ? HOT 1
- windows build linker line too long error
- adding dsi peripheral support HOT 2
- Is it possible to link in C libs, like the STM32F4xxx HAL drivers?
- is it possible to use this for stm32h743bit6 ? HOT 1
- Docs about differences between Emgo and Go? HOT 3
- Generating packages for stm32f030x8 HOT 5
- Does nrf5 ble support hid? HOT 3
- [Question] Steps to capture SWO HOT 2
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 emgo.