Set up build environment for macosx

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
ST58
Posts: 5
Joined: Fri Mar 10, 2017 4:56 pm

Set up build environment for macosx

Postby ST58 » Sun Mar 12, 2017 9:45 am

I am trying to set up the build environment on mac osx. I followed the instructions on
https://github.com/micropython/micropyt ... on-Mac-OSX
I used MacPorts to download the listed packages.
When I do a test build of the \unix directory I get the following almost straight away..
"make: *** No rule to make target 'lib/Berkeley-db-1.xx/btree/bt_close.c',needed by 'build/genhdr/qstr.i.last'. Stop."

What step have I missed or what am I doing wrong?

Secondly - how do I install the arm gcc on mac so I can build boards from the stmhal - please take into account I am not really a Linux/Mac person - so need more detailed instructions!

ST58
Posts: 5
Joined: Fri Mar 10, 2017 4:56 pm

Re: Set up build environment for macosx

Postby ST58 » Mon Mar 13, 2017 8:10 am

I found the answer to this, some of the docs etc. are out of sync. Answer was in the main GitHub readme!
You need to first call 'make axtls', to build some dependency libraries. Then when you call make - all builds fine for unix. Quick test shows micropython build is working.

However I could still do with some help with simple command script to install the arm gcc package on mac. Initial googling seems to suggest something along the lines of download the package - then a sudo command to untar and install. I assume that this will add to the bash path so the gcc compiler will be found - but if someone could give me a quick example of the correct sudo command sequence it would be appreciated.


Thanks

SpotlightKid
Posts: 185
Joined: Wed Apr 08, 2015 5:19 am

Re: Set up build environment for macosx

Postby SpotlightKid » Mon Mar 13, 2017 11:59 am

The wiki pages on Github are not part of the official docs, they are often user contributed content, that doesn't go through a review like pull requests for the official docs do. This could maybe made clearer on the wiki index page, but for now just keep in mind, that the README files in the repository and official docs at docs.micropython.org are the place to look first (even if the latter have a fair amount of inaccuracies and omissions as well).

User avatar
deshipu
Posts: 939
Joined: Thu May 28, 2015 5:54 pm

Re: Set up build environment for macosx

Postby deshipu » Mon Mar 13, 2017 4:25 pm

Also, if you find something wrong or imprecise in those wiki pages, please correct it. This way we can keep them up to date.

ST58
Posts: 5
Joined: Fri Mar 10, 2017 4:56 pm

Re: Set up build environment for macosx

Postby ST58 » Mon Mar 13, 2017 7:16 pm

I will happily update the Mac OS X dependancies page on the wiki when I get answers on where to get the correct dependancies and some suggestions on how to install them!

I am referring to the section...

Compiling the stmhal port for the pyboard

Required software:

mac version of gcc-arm-none-eabi, version >= 4.8
dfu-util >= 0.7 to load firmware to pyboard
Python3 >= 3.3
pyserial package for Python3
TODO: building stmhal

TODO: Using test scripts to run tests on pyboard.....

Any suggestions?


Return to “Development of MicroPython”

Who is online

Users browsing this forum: No registered users and 1 guest