You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In either case, building the stm32/examples/f4-explorer/blinky sample will hit a linker line too long error. The reason is that all the lists of dependents for every package are concatenated together such that some packages appeared too many times on the command line. And the windows clearly cannot cope with it.
I'm using this patch to get it work around:
--- a/egc/buildtools.go
+++ b/egc/buildtools.go
@@ -240,6 +240,20 @@ func (bt *BuildTools) Link(e string, imports []string, o ...string) error {
if err != nil {
return err
}
+ // eliminate duplicate elements.
+ a = func(b []string) ([]string) {
+ rv := make([]string, 0)
+ regm := make(map[string]int)
+ for _,x := range b {
+ if _,ok := regm[x]; !ok {
+ rv = append(rv, x)
+ regm[x] = 1
+ }
+ }
+ return rv
+ }(a)
+ // then supply the list twice for linker to find earlier dependants
+ args = append(args, a...)
args = append(args, a...)
if bt.LDlibgcc != "" {
Since I'm not very good at golang, this may not be the best fix. Hope a better patch can be applied.
If you wonder, I'm thinking of porting it to picorv32 or myblaze. A long way ahead.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi, Just would like to let you know the thanks for the great work bringing the golang to the bare metal world! Really appreciated your work!
I'm building it on windows. Though, the note say it is run under cygwin, really it can just use the raw windows cmd window. Because both the cross-toolchain and the go-sdk installed are for raw windows. The notes is here: https://github.com/minghuadev/emgo/blob/minghuadev-notes/localnotes-win-cygwin.md
In either case, building the stm32/examples/f4-explorer/blinky sample will hit a linker line too long error. The reason is that all the lists of dependents for every package are concatenated together such that some packages appeared too many times on the command line. And the windows clearly cannot cope with it.
I'm using this patch to get it work around:
Since I'm not very good at golang, this may not be the best fix. Hope a better patch can be applied.
If you wonder, I'm thinking of porting it to picorv32 or myblaze. A long way ahead.
Thanks.
The text was updated successfully, but these errors were encountered: