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>
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>
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>
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>
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>
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>