Compile Micropython By MDK or IAR

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
User avatar
fkeujjpdc
Posts: 13
Joined: Thu Mar 23, 2017 3:17 am
Location: china

Compile Micropython By MDK or IAR

Post by fkeujjpdc » Tue Apr 25, 2017 7:55 am

hi, in this forum i learn much knowledge about micropython .thanks very much.
this time , i want add micropython to my project,then provide a python interface to user,it will be simple to use my product.
if it can be compile by MDK or IAR is very greatful. it will be debug simpile and modify simpile .
but i qstr preprocess is very complex.i read Makefile and get this information:
1.gcc -E generate qstr.i.last
2.makeqstrdefs.py split $(DestDir)qstr.i.last $(DestDir)qstr $(QstrDefsCollected)
3.makeqstrdefs.py cat $(DestDir)qstr.i.last $(DestDir)qstr $(QstrDefsCollected)
4.i don't know how to gen qstrdefs.generated.h(it seems user sed ,on windows i have no idea use any command tools)
5.makeqstrdata.py $(DestDir)/qstrdefs.preprocessed.h qstrdefs.generated.h

i write above command into a bat command file. then add all micropython source files into IAR or MDK project. then execute this bat file before i compile the project.
Please give some advice! (what's problem on this way)

by the way,i use eclipse + gcc compile micropython use micropython Makefile. And It Can be debug by eclipse.but my workmate don't like use it :D .so MDK or IAR is my best choice.

stefon86
Posts: 2
Joined: Wed May 10, 2017 8:44 am

Re: Compile Micropython By MDK or IAR

Post by stefon86 » Wed May 10, 2017 8:47 am

Hi fkeujjpdc

I want to do the same thing: Port micropython to IAR Compiler.

Did you get any longer with that?

User avatar
fkeujjpdc
Posts: 13
Joined: Thu Mar 23, 2017 3:17 am
Location: china

Re: Compile Micropython By MDK or IAR

Post by fkeujjpdc » Sat Jun 03, 2017 7:11 am

I've been busy with other things recently, but I've been trying to find a solution in my spare time, so we can discuss it together. MDK and IAR can use GCC, you can correctly compile Micropython, and now the more troublesome is QSTR generation. If we refer to VS project ,we should be able to work out

ajie_dirgantara
Posts: 81
Joined: Fri Sep 02, 2016 9:26 am

Re: Compile Micropython By MDK or IAR

Post by ajie_dirgantara » Fri Jun 23, 2017 8:42 pm

ok to do this easily, just compile on any linux box, and you'll get all the qstr files.. this is what I do

Post Reply