Git Product home page Git Product logo

Comments (3)

sergiuszm avatar sergiuszm commented on July 23, 2024

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.

ziutek avatar ziutek commented on July 23, 2024

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.

ziutek avatar ziutek commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.