Commit Graph

9 Commits

Author SHA1 Message Date
Paul Sokolovsky 0dbd928cee Makefiles: Remove duplicate object files when linking.
Scenario: module1 depends on some common file from lib/, so specifies it
in its SRC_MOD, and the same situation with module2, then common file
from lib/ eventually ends up listed twice in $(OBJ), which leads to link
errors.

Make is equipped to deal with such situation easily, quoting the manual:
"The value of $^ omits duplicate prerequisites, while $+ retains them and
preserves their order." So, just use $^ consistently in all link targets.
2015-10-24 15:46:53 +03:00
Paul Sokolovsky e0f5df579b all: Make netutils.h available to all ports by default.
Generally, ports should inherit INC from py.mk, append to it, not
overwrite it. TODO: Likely should do the same for other vars too.
2015-10-19 18:32:42 +03:00
Damien George 85e8e2ed5b qemu-arm: Add 'test' target to Makefile to run and verify test suite.
Replaces RUN_TEST=1 definition; now "make test" in qemu-arm directory
will run tests/basics/ and check that they all succeed.

This patch also enables the test on Travis CI.
2015-01-09 00:03:21 +00:00
Damien George 4ef4ffe1c5 qemu-arm: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:15:38 +00:00
Paul Sokolovsky 3b74c91684 Makefiles: Support py/*.h includes per #1022. 2014-12-27 16:32:52 +02:00
stijn 4e54c876a7 Add -Wpointer-arith flag to prevent problems with pointer arithmetic on void* 2014-10-29 10:29:09 +01:00
Ilya Dmitrichenko c1c32d65af qemu-arm: fully integrated test suite.
This is primarily intended to provide testing of Thumb-specific code within
Travis CI as well as if anyone else want to run it locally.  As discussed in
purposes.  This is currently agains an emulated Cortex-M3 core, however in
the near future it can extended to support M0, M0+ as well M4 (work in
progress exists in sushihangover/qemu).

It's probably true that most of the code base can be covered running uPy
natively on a POSIX system, however we do have the tiny bit of assembly
code.  There may exist bugs related to endianness and type aliases, let
alone potential standard library or compiler bugs or even
architecture-specific optimisations.

This could also incorporate lwIP (or other TCP/IP stack) integration as well
as SDIO+FATFS drivers.

The solution to inline the test cases was chose due to simplicity. It could
alternatively be implemented in a number of different way (see #515), but
this looked the simplest.

Inclusion of tinytest was just to avoid writing boilerplate code for
counting failed tests and other utility functions.  Currently only a few
functions are used, however this could be extended.  Checking in the code
instead of using submodule was a personal preference, but if people do want
the pain of submodules, this can provided.  This particular framework is
also pretty good if one desires to run unit test on target.  The approach
with scripts being inlined is probably not quite suited for the size of
memory an MCU has, but the tinytest itself should be good, if lower-level C
code is to be unit tested.
2014-05-08 01:41:32 +03:00
Ilya Dmitrichenko b554bc5691 qemu-arm: update makefile (d553be5). 2014-04-21 21:08:15 +01:00
Ilya Dmitrichenko 2face99cfe qemu-arm: more generic port name. 2014-04-21 21:04:04 +01:00