aboutsummaryrefslogtreecommitdiff
path: root/stmhal/Makefile
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-08-29stmhal/Makefile: Automatically fetch stm32lib submodule if needed.Damien George
2017-08-29stmhal/Makefile: Use lib/stm32lib instead of local cmsis and hal files.Damien George
2017-08-24stmhal/Makefile: Use GEN_PINS_HDR var instead of writing it explicitly.Damien George
2017-08-24stmhal: Compute PLL freq table during build instead of at run time.Damien George
Allows for simpler, smaller and faster code at run time when selecting the boards frequency, and allows more customisation opportunities for the PLL values depending on the target MCU.
2017-08-11all: Make use of $(TOP) variable in Makefiles, instead of "..".Damien George
$(TOP) is defined in py/mkenv.mk and should be used to refer to the top level of this repository.
2017-06-28stmhal/Makefile: Add CFLAGS_EXTRA to CFLAGS so cmdline can add options.Damien George
2017-06-28stmhal/Makefile: Rename FLOAT_IMPL to MICROPY_FLOAT_IMPL to match C nameDamien George
The name used in py/mpconfig.h is MICROPY_FLOAT_IMPL so rename this Makefile variable to mirror that.
2017-06-28stmhal/Makefile: Use hardware double-prec FP for MCUs that support it.Damien George
2017-06-28stmhal: Add possibility to build with double-precision floating point.Damien George
By default the firmware is built with single-precision floating point. To build a particular board using double precision instead, put the following line in the mpconfigboard.mk file: FLOAT_IMPL = double
2017-06-22stmhal: Make available the _onewire module, for low-level bus control.Damien George
2017-06-15stmhal: Move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use.Damien George
It provides sys.stdin, sys.stdout, sys.stderr for bare-metal targets based on mp_hal functions.
2017-06-01ports: Convert from using stmhal's input() to core provided version.Damien George
2017-03-31all: Use full path name when including mp-readline/timeutils/netutils.Damien George
This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed.
2017-03-24py/modbuiltins: For round() builtin use nearbyint instead of round.Damien George
The C nearbyint function has exactly the semantics that Python's round() requires, whereas C's round() requires extra steps to handle rounding of numbers half way between integers. So using nearbyint reduces code size and potentially eliminates any source of errors in the handling of half-way numbers. Also, bare-metal implementations of nearbyint can be more efficient than round, so further code size is saved (and efficiency improved). nearbyint is provided in the C99 standard so it should be available on all supported platforms.
2017-03-23all/Makefile: Remove -ansi from GCC flags, its ignored anyway.Krzysztof Blazewicz
The -ansi flag is used for C dialect selection and it is equivalent to -std=c90. Because it goes right before -std=gnu99 it is ignored as for conflicting flags GCC always uses the last one.
2017-02-15stmhal: Use generic interrupt char code.Damien George
2017-02-08stmhal/Makefile: Drop use of -mabi=aapcs-linux; link libgcc by default.Damien George
The aapcs-linux ABI is not required, instead the default aapcs ABI is enough. And using the default ABI means that the provided libgcc will now link with the firmware without warnings about variable vs fixed enums. Although the binary size increases by about 1k, RAM usage is slightly decreased. And libgcc may prove useful in the future for things like long-long division.
2017-01-31stmhal: Initial implementation of multithreading, currently disabled.Damien George
This patch brings the _thread module to stmhal/pyboard. There is a very simple round-robin thread scheduler, which is disabled if there is only one thread (for efficiency when threading is not used). The scheduler currently switches threads at a rate of 250Hz using the systick timer and the pend-SV interrupt. The GIL is disabled so one must be careful to use lock objects to prevent concurrent access of objects. The threading is disabled by default, one can enabled it with the config option MICROPY_PY_THREAD to test it out.
2017-01-27stmhal: Convert to use VFS sub-system and new ooFatFs component.Damien George
This patch makes the following configuration changes: - MICROPY_FSUSERMOUNT is disabled, removing old mounting infrastructure - MICROPY_VFS is enabled, giving new VFS sub-system - MICROPY_VFS_FAT is enabled, giving uos.VfsFat type - MICROPY_FATFS_OO is enabled, to use new ooFatFs lib, R0.12b User facing API should be almost unchanged. Most notable changes are removal of os.mkfs (use os.VfsFat.mkfs instead) and pyb.mount doesn't allow unmounting by passing None as the device.
2017-01-24stmhal: Add ability to have filesystem stored on external SPI flash.Damien George
To use this feature a port should define MICROPY_HW_SPIFLASH_SIZE_BITS along with x_CS, x_SCK, x_MOSI, x_MISO (x=MICROPY_HW_SPIFLASH). This will then use external SPI flash on those pins instead of the internal flash. The SPI is done using the software implementation. There is currently only support for standard SPI (ie not dual or quad mode).
2017-01-23stmhal: Add default frozen-bytecode directory and link lcd160cr driver.Damien George
stmhal will now be built by default with frozen bytecode from scripts stored in the stmhal/modules/ directory. This can be disabled or changed to another directory by overridding the make variable FROZEN_MPY_DIR.
2017-01-22stmhal: Convert to use builtin help function.Damien George
2017-01-12stmhal: fix wrong usage of gcc -print-libgcc-file-namePavol Rusnak
2016-11-28stmhal: Add address parameters to openocd config files.Nicholas Graumann
Also make l4 config the default for STM32L476DISC board.
2016-11-24stmhal: Add beginnings of port-specific machine.I2C implementation.Damien George
This allows one to construct an I2C object using ids that are specific to the stmhal port, eg machine.I2C('X'). Right now the implementation of I2C uses software I2C but the idea is to just change the C-level I2C protocol functions to hardware implementations later on.
2016-11-21stmhal/moduselect: Move to extmod/ for reuse by other ports.Paul Sokolovsky
2016-11-16py/lexer: Provide generic mp_lexer_new_from_file based on mp_reader.Damien George
If a port defines MICROPY_READER_POSIX or MICROPY_READER_FATFS then lexer.c now provides an implementation of mp_lexer_new_from_file using the mp_reader_new_file function.
2016-11-08py: Move frozen bytecode Makefile rules from ports to common mk files.Damien George
Now, to use frozen bytecode all a port needs to do is define FROZEN_MPY_DIR to the directory containing the .py files to freeze, and define MICROPY_MODULE_FROZEN_MPY and MICROPY_QSTR_EXTRA_POOL.
2016-11-03lib/libm: Move Thumb-specific sqrtf function to separate file.Damien George
This allows it to be used only when the hardware supports VFP instructions, preventing compile errors.
2016-10-21stmhal/Makefile: Use standard rules for frozen module generation.Paul Sokolovsky
As defined in py/py.mk.
2016-10-16esp8266, stmhal, unix: MAKE_FROZEN is consistently defined in mkenv.mk.Paul Sokolovsky
2016-10-05stmhal: Fix ESPRUINO_PICO by adding ld scripts with correct flash size.Dave Hylands
2016-10-04stmhal/usb: Add support to receive USB HID messages from host.Philip Potter
2016-10-04stmhal: Fix linker map for STM32L476 chips.Dave Hylands
In particular, this makes the L4 .isr_vector section 16K in size so it's the same as the F4/F7 MCUs. The patch also moves the L4 filesystem to the end of flash, which allows for 512K filesystem on the 1Mb devices like the STM32L476DISC.
2016-09-30lib/cmsis: move CMSIS headers to lib/Krzysztof Blazewicz
Files in lib/cmsis are generic for all Cortex-M MCU's files left in stmhal/cmsis are all STM32 specific.
2016-09-22stmhal: Put common definitions from linker files to common.ld.Krzysztof Blazewicz
2016-09-05unix,stmhal,esp8266: When find'ing frozen files follow symbolic links.Damien George
It's useful to be able to use symbolic links to add files and directories to the set of scripts to be frozen.
2016-09-05py: Add MICROPY_USE_INTERNAL_PRINTF option, defaults to enabled.Delio Brignoli
This new config option allows to control whether MicroPython uses its own internal printf or not (if not, an external one should be linked in). Accompanying this new option is the inclusion of lib/utils/printf.c in the core list of source files, so that ports no longer need to include it themselves.
2016-09-04stmhal: Add machine.WDT class.Damien George
Usage: import machine wdt = machine.WDT(0, 5000) # 5 second timeout wdt.feed() Thanks to Moritz for the initial implementation.
2016-08-31unix,stmhal,esp8266: When find'ing frozen files don't use extra slash.Damien George
This extra forward slash for the starting-point directory is unnecessary and leads to additional slashes on Max OS X which mean that the frozen files cannot be imported. Fixes #2374.
2016-05-23stmhal: Support frozen packages using .mpy files.Damien George
See issue #1814.
2016-04-25cc3200, stmhal, teensy: Use pyhelp_print_obj function.Colin Hogben
Update the help() implementations in the cc3200, stmhal and teensy ports to use the pyhelp_print_obj function.
2016-04-19stmhal: Update Makefile dependencies.Paul Sokolovsky
2016-04-16stmhal: L4: Add line to Makefile for building L4 series.Tobias Badertscher
2016-04-16stmhal: For frozen bytecode generation, add dependency of qstr file.Damien George
2016-04-16py: Add rules for automated extraction of qstrs from sources.Jan Čapek
- add template rule that converts a specified source file into a qstring file - add special rule for generating a central header that contains all extracted/autogenerated strings - defined by QSTR_DEFS_COLLECTED variable. Each platform appends a list of sources that may contain qstrings into a new build variable: SRC_QSTR. Any autogenerated prerequisities are should be appened to SRC_QSTR_AUTO_DEPS variable. - remove most qstrings from py/qstrdefs, keep only qstrings that contain special characters - these cannot be easily detected in the sources without additional annotations - remove most manual qstrdefs, use qstrdef autogen for: py, cc3200, stmhal, teensy, unix, windows, pic16bit: - remove all micropython generic qstrdefs except for the special strings that contain special characters (e.g. /,+,<,> etc.) - remove all port specific qstrdefs except for special strings - append sources for qstr generation in platform makefiles (SRC_QSTR)
2016-04-13stmhal: Add Makefile option FROZEN_MPY_DIR to support frozen bytecode.Damien George
2016-04-13py: Add ability to have frozen persistent bytecode from .mpy files.Damien George
The config variable MICROPY_MODULE_FROZEN is now made of two separate parts: MICROPY_MODULE_FROZEN_STR and MICROPY_MODULE_FROZEN_MPY. This allows to have none, either or both of frozen strings and frozen mpy files (aka frozen bytecode).
2016-03-09stmhal: Add makefile target and configuration to deploy via OpenOCD.Christopher Arndt