Commit Graph

7 Commits

Author SHA1 Message Date
Chris Packham
81c4788ded micropython: Bump version to v1.4.6
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-09-24 09:52:24 +02:00
Chris Packham
2391109a80 micropython: Disable for Blackfin
There are two problems building micropython for Blackfin. The first is
some printf format specifier warnings/errors that seem to be triggered
only for that architecture/compiler. This could be worked around by
specifying CFLAGS=-Wno-error=format.

The second problem is that libffi doesn't provide the closure
implementation on Blackfin. There is no known workaround for this issue.

For now disable micropython on Blackfin.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-09-24 09:51:54 +02:00
Chris Packham
4d061220ae micropython: Invert fallback detection logic
Rather than specifying architectures that do not have explicit support
in micropython invert the logic and set MICROPY_GCREGS_SETJMP=1 if the
architecture does not have explicit support. MIPS is listed as being
supported but this support consists of automatically defining
MICROPY_GCREGS_SETJMP 1 based on __mips__ being defined.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-09-24 09:51:20 +02:00
Vicente Olivert Riera
9119c1e658 micropython: fix build for MIPS64 n32
This patch applies an upstream patch to fix a compile error like this
one:

modffi.c: In function 'ffifunc_call':
modffi.c:358:25: error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
             values[i] = (ffi_arg)a;

This error can be highlighted when building micropython for MIPS64 n32
because ffi_arg is 64-bit wide and the pointers on MIPS64 n32 are 32-bit
wide, so it's trying to case an integer to a pointer (or vice versa) of
a different size. We should cast first the pointer (or the integer) to a
pointer sized integer (intptr_t) to fix that problem.

This patch was merged upstream as a result of this pull request:

  https://github.com/micropython/micropython/pull/1471

Fixes:

  http://autobuild.buildroot.net/results/e22/e2253de3f96e9a53e75b4cecaf56c1df2950803f/

[Thomas: use a single assignement for MICROPYTHON_PATCH.]

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-09-23 23:10:30 +02:00
Chris Packham
bccecbe1e6 micropython: Add upstream patch to fix 64-bit builds
Fixes the following error when building for a 64-bit target

  ../py/objint_mpz.c:54:5: error: right shift count >= width of type [-Werror]
       (MP_SSIZE_MAX >> MPZ_DIG_SIZE * 4) & DIG_MASK,
       ^
  ../py/objint_mpz.c:54:5: error: initializer element is not constant
  ../py/objint_mpz.c:54:5: error: (near initialization for 'maxsize_dig[4]')

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-09-20 14:26:03 +02:00
Chris Packham
4685485ef7 micropython: Set MICROPY_GCREGS_SETJMP=1 for xtensa and sh
These architectures don't have explicit exception handling support in
micropython but can use the setjmp fallback behaviour instead.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-09-19 14:00:15 +02:00
Chris Packham
9646e80fca micropython: new package
Micro Python is a lean and fast implementation of the Python 3
programming language that is optimised to run on a microcontroller.

[Thomas: fix minor typo in Config.in noticed by Vicente.]

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-09-17 23:36:51 +02:00