tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
15.33k stars 905 forks source link

gen-device-svd generates invalid code for multi-line interrupt descriptions #1603

Closed asenci closed 3 years ago

asenci commented 3 years ago

gen-device-svd generates invalid code when peripheral description spans multiple lines on the source SVD.

e.g.: Source SVD: https://github.com/posborne/cmsis-svd/blob/master/data/RaspberryPi/rp2040.svd

Generated code:

    XIP_SSI = (*XIP_SSI_Type)(unsafe.Pointer(uintptr(0x18000000))) // DW_apb_ssi has the following features:
* APB interface – Allows for easy integration into a DesignWare Synthesizable Components for AMBA 2 implementation.
* APB3 and APB4 protocol support.
// Interrupt numbers.
const (
    IRQ_TIMER_IRQ_0 = 0 // Controls time and alarms
time is a 64 bit value indicating the time in usec since power-on
timeh is the top 32 bits of time & timel is the bottom 32 bits
to change time write to timelw before timehw
deadprogram commented 3 years ago

This has been released with v0.17.0 so now closing. Thanks!