Logo
Explore Help
Register Sign In
admin/llgo
1
0
Fork 0
You've already forked llgo
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
940c6f7625198107345796bef75a743926619355
llgo/_demo/normal/export/main.go

23 lines
331 B
Go
Raw Normal View History

feat: restrict //export different symbol names to baremetal targets only - Modified cl/import.go to check LLGO_TARGET_BAREMETAL env var - For baremetal targets: //export SymbolName allows different export name (TinyGo-style) - For normal targets: //export SymbolName uses SymbolName as function name (standard Go) - Set LLGO_TARGET_BAREMETAL=1 in internal/build/build.go when baremetal tag present - Added test for normal targets in _demo/normal/export/ - Added CI test to verify both embedded and normal target behavior Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
2025-11-03 06:20:42 +00:00
package main
//export LPSPI2_IRQHandler
func LPSPI2_IRQHandler() {
println("LPSPI2 interrupt handled")
}
//export SysTick_Handler
func SysTick_Handler() {
println("System tick")
}
//export Add
func Add(a, b int) int {
return a + b
}
func main() {
LPSPI2_IRQHandler()
SysTick_Handler()
println("Add(2, 3) =", Add(2, 3))
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 86ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API