feat: add export symbol name test to CI for embedded targets
- Created _demo/embed/export/ with test for //export directive - Test verifies symbols are exported with correct names (LPSPI2_IRQHandler, SysTick_Handler) - Added CI workflow step to run the test - Essential for embedded development where hardware requires specific symbol names 🤖 Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
This commit is contained in:
22
_demo/embed/export/main.go
Normal file
22
_demo/embed/export/main.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
//export LPSPI2_IRQHandler
|
||||
func interruptLPSPI2() {
|
||||
println("LPSPI2 interrupt handled")
|
||||
}
|
||||
|
||||
//export SysTick_Handler
|
||||
func systemTickHandler() {
|
||||
println("System tick")
|
||||
}
|
||||
|
||||
//export Add
|
||||
func Add(a, b int) int {
|
||||
return a + b
|
||||
}
|
||||
|
||||
func main() {
|
||||
interruptLPSPI2()
|
||||
systemTickHandler()
|
||||
println("Add(2, 3) =", Add(2, 3))
|
||||
}
|
||||
Reference in New Issue
Block a user