Beginners

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
milkybar_ton
Posts: 6
Joined: Thu Apr 17, 2014 10:11 am

Beginners

Post by milkybar_ton » Thu Apr 17, 2014 10:14 am

Hi there,

Looking forward to getting my micro python board and a couple of bits and pieces for me to get started.
I find the whole GitHub thing a bit confusing, what exactly am i supposed to download and install?
Are there going to be some kind of instructions available for the novices among us?

milky

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Beginners

Post by dhylands » Thu Apr 17, 2014 10:23 pm

So, I would expect that your micropython board will come with micropython already installed.

You'll only need to download the source from github if you want to update to the latest firmware.

There is a wiki here: https://github.com/micropython/micropython/wiki

Currently, I think you need linux in order to build the micropython firmware. Assuming that you have all of the dependencies installed, then you should be able to do:

git clone https://github.com/micropython/micropython
cd micropython/stmhal
make

and it will build a new firmware image for the micropython board. Be sure to check out the wiki and the REAME.md file at the top of the git repository.

As far as flashing the firmware onto the device, the instructions on this page: https://github.com/micropython/micropyt ... -Discovery also apply to the micropython board (there are some differences since the button locations are different, and it is a different board).

wrobell
Posts: 2
Joined: Fri Apr 25, 2014 8:47 am

Re: Beginners

Post by wrobell » Fri Apr 25, 2014 9:33 am

milkybar_ton wrote:Hi there,

Looking forward to getting my micro python board and a couple of bits and pieces for me to get started.
I find the whole GitHub thing a bit confusing, what exactly am i supposed to download and install?
Are there going to be some kind of instructions available for the novices among us?

milky
Do you want to try to run Micro Python on your PC first?

detour_vmx
Posts: 4
Joined: Fri Dec 19, 2014 3:15 am

Re: Beginners

Post by detour_vmx » Sat Dec 20, 2014 10:21 pm

Regarding cross-compiler:

I use Linux and have some different versions of cross-compilers on my system. Some support legacy products so I want to keep the last compiler used on the product safe. So, I don't have a path in my environment to a cross compiler.

It wasn't a big deal to add a path to the compiler in the Makefile and I'm happy to say it compiled and linked perfectly. Congratulations on that!!!!

This is my latest version.
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278]

Maybe add a $PATH var in the Makefile or get it from the command line?

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Beginners

Post by pfalcon » Sat Dec 20, 2014 10:35 pm

There's no need to set PATH, because everyone already has it set as they like (and everyone likes it be set different way).
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Beginners

Post by dhylands » Sun Dec 21, 2014 1:53 am

detour_vmx wrote:Regarding cross-compiler:

I use Linux and have some different versions of cross-compilers on my system. Some support legacy products so I want to keep the last compiler used on the product safe. So, I don't have a path in my environment to a cross compiler.

It wasn't a big deal to add a path to the compiler in the Makefile and I'm happy to say it compiled and linked perfectly. Congratulations on that!!!!

This is my latest version.
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278]

Maybe add a $PATH var in the Makefile or get it from the command line?
You can do customizations like that by creating a GNUmakefile and putting your customizations in there. For example, if you wanted to build for the Discovery board all the time, then you could create a GNUmakefile like this:
https://gist.github.com/dhylands/c3156007482c45ba8f7a

As far as the PATH goes, I normally just modify my PATH in my .bashrc file to include the toolchain directory.

Post Reply