Go Language Cross compiler for i.MX6 (C1200QM-N512-ND8)

Hi,

I am looking out for cross compiling go language code to run on i.MX6 (C1200QM-N512-ND8).

As on date I am using Windows 7 to run eclipse with goClipse plugin. I want to move my go code development to Ubuntu-14.04 running desktops and then use eclipse and goClipse to build code.

I have a i.MX6 hardware for which my team has built various packages with help of yocto. My team is also developing Java and Node.JS codes for the hardware platform. The RTOS used on i.MX6 is Ubuntu-14.04.

As we want to port parts of our old C code to the i.MX6 hardware, I think it would be better to code them in go language. Hence a handy cross compiler and a debugger is required.

I also want to call parts of C code from go Language. Further I want to compare execution time for a known sequence, when it is coded in go-lang, JAVA, Java Script and Node.JS.

Please share inputs and procedure that will help me cross compile and debug the code.

Thanks and regards,
Raj

That looks like an ARM chip, so GOOS=linux GOARCH=arm go build -i -v ... should be close to what you need?

first check if go arm compiler is compatible with your machine…

for this kind of tasks i recommend working on Ubuntu and deploy the project on remote machine because, generaly speaking, is hard to work directly on ARM machines especially from performance reason vs an usual machine and some lack of tools.

also, you can try use Gopei shell on an usual Ubuntu machine and teleport the project on the ARM machine at the end (even scheduled) :wink:

Push the entire current project folder content on remote machine. Sources and binaries. Also push command will follow current sources tree structure.

Before run this command the project must be compiled with remote machine architecture. View LiteIDE environment bar for this.

This’ll work just fine. https://dave.cheney.net/2015/08/22/cross-compilation-with-go-1-5

1 Like

Hey @dfc,

Ugh, this is really slow!

i put a ssd on my working machine and cross compiling became extremely fast. i guess is a good trick.

Iff you have installed Go from source, you can use go install or go build -I to cache intermediate compilations.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.