Files
llgo/_demo/embed/export/main.go
xgopilot c0a3a19294 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>
2025-10-31 04:07:37 +00:00

23 lines
331 B
Go

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))
}