aboutsummaryrefslogtreecommitdiff
path: root/stmhal/Makefile
AgeCommit message (Collapse)Author
2014-08-07Add support for selecting pin alternate functions from python.Dave Hylands
Converts generted pins to use qstrs instead of string pointers. This patch also adds the following functions: pyb.Pin.names() pyb.Pin.af_list() pyb.Pin.gpio() dir(pyb.Pin.board) and dir(pyb.Pin.cpu) also produce useful results. pyb.Pin now takes kw args. pyb.Pin.__str__ now prints more useful information about the pin configuration. I found the following functions in my boot.py to be useful: ```python def pins(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin))) def af(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin.af_list()))) ```
2014-08-06stmhal: Update STM32Cube F4 HAL driver to V1.3.0.Damien George
This patch updates ST's HAL to the latest version, V1.3.0, dated 19 June 2014. Files were copied verbatim from the ST package. Only change was to suppress compiler warning of unused variables in 4 places. A lot of the changes from ST are cosmetic: comments and white space. Some small code changes here and there, and addition of F411 header. Main code change is how SysTick interrupt is set: it now has a configuration variable to set the priority, so we no longer need to work around this (originall in system_stm32f4xx.c).
2014-07-31stmhal: Change 0:/ and 1:/ to /flash and /sd; add CWD support.Damien George
Some important changes to the way the file system is structured on the pyboard: 1. 0: and 1: drive names are now replaced with POSIX inspired directories, namely /flash and /sd. 2. Filesystem now supports the notion of a current working directory. Supports the standard Python way of manipulating it: os.chdir and os.getcwd. 3. On boot up, current directory is /flash if no SD inserted, else /sd if SD inserted. Then runs boot.py and main.py from the current dir. This is the same as the old behaviour, but is much more consistent and flexible (eg you can os.chdir in boot.py to change where main.py is run from). 4. sys.path (for import) is now set to '' (current dir), plus /flash and /flash/lib, and then /sd and /sd/lib if SD inserted. This, along with CWD, means that import now works properly. You can import a file from the current directory. 5. os.listdir is fixed to return just the basename, not the full path. See issue #537 for background and discussion.
2014-07-21Allow DFU_UTIL to be overridden from the environment.Dave Hylands
2014-06-20Added hexfile targetWindel Bouwman
2014-06-18bare-arm, stmhal, teensy: Duplicate -nostdlib to CFLAGSSven Wegener
As we are building with -nostdlib gcc features like the stack protector will fail linking, because the failure handlers are in gcc's internal libs. Such features are implicitly disabled during compilation when -nostdlib is used in CFLAGS too. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2014-06-18bare-arm, stmhal: Fix --nostdlib to -nostdlibSven Wegener
-nostdlib is the correct option, gcc recognizes the double dash version when in link-only mode, but not when compiling. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2014-05-03Add device ID to deploy make target for stmhal.Craig Barnes
2014-05-03stmhal: Change names: flash to firmware, flashboard to deploy.Damien George
Since firmware lives in a build directory which already specifies the board name, no real reason to also have the firmware have the board name.
2014-05-03stmhal: Default build directory now includes board name.Damien George
BUILD is build-$(BOARD) by default.
2014-05-01Add flashboard target to the stmhal Makefile to run dfu-utilAndrew Scheller
Which allows you to run "make -C stmhal flashboard" from the top-level directory. Also ties in nicely with my configurable BUILD directory from #506
2014-04-30stmhal: Reinstate CC3000 driver from old stm/ port.Damien George
It's not enabled by default because it doesn't fully work. It can connect to an AP, get an IP address and do a host-lookup, but not yet do send or recv on a socket.
2014-04-21stmhal: Rename USART to UART.Damien George
It's really a UART because there is no external clock line (and hence no synchronous ability, at least in the implementation of this module). USART should be reserved for a module that has "S"ynchronous capabilities. Also, UART is shorter and easier to type :)
2014-04-21stmhal, SPI and I2C: Improvements to functionality and consistency.Damien George
2014-04-20stmhal: Add SPI class.Damien George
Also some updates to compile with latest changes to core py.
2014-04-18stmhal: Big cleanup; merge gpio into Pin; make names consistent.Damien George
This is an attempt to clean up the Micro Python API on the pyboard. Gpio functionality is now in the Pin object, which seems more natural. Constants for MODE and PULL are now in pyb.Pin. Names of some classes have been adjusted to conform to CamelCase. Other miscellaneous changes and clean up here and there.
2014-04-17build: Simplify build directory layout by putting all headers in genhdr.Damien George
Any generated headers go in $(BUILD)/genhdr/, and are #included as 'genhdr/xxx.h'.
2014-04-17Merge branch 'relocatable-build-dir' of github.com:lurch/micropython into ↵Damien George
lurch-relocatable-build-dir
2014-04-17stmhal: Clean up fatality indications; remove long-obsolete malloc0.c.Damien George
2014-04-17stmhal: Add more math functions.Damien George
Taken straight from musl and newlib. License seems compatible with MIT.
2014-04-16build directory can now be renamedAndrew Scheller
The autogenerated header files have been moved about, and an extra include dir has been added, which means you can give a custom BUILD=newbuilddir option to make, and everything "just works" Also tidied up the way the different Makefiles build their include- directory flags
2014-04-16Auto-generate the stmhal/pybcdc_inf header file from static filesAndrew Scheller
The USB VID&PID are automatically extracted from usbd_desc_cdc_msc.c and inserted into pybcdc_inf.template, ensuring that the same USB IDs get used everywhere
2014-04-10stmhal: Add stm module, which contains some constants for the MCU.Damien George
Also contains raw memory read/write functions, read8, read16, read32, write8, write16, write32. Can now do: stm.write16(stm.GPIOA + stm.GPIO_BSRRL, 1 << 13) This turns on the red LED. With the new constant folding, the above constants for the GPIO address are actually compiled to constants (and the addition done) at compile time. For viper code and inline assembler, this optimisation will make a big difference. In the inline assembler, using these constants would not be possible without this constant folding.
2014-04-07Replace some Makefile commands with variables in py/mkenv.mkAndrew Scheller
2014-04-02stmhal: Add timer module; move servo PWM from TIM2 to TIM5.Damien George
As per issue #257, servo is better on TIM5 because TIM2 is connected to more GPIO.
2014-03-30stmhal: Unify naming of HW config; make SD detect configurable.Damien George
All board config macros now begin with MICROPY_HW_. Renamed PYBv10 to PYBV10, since macros should be all uppercase. Made SDCARD_DETECT configurable in mpconfigport.h, so that the SD detect pin can be easily configured.
2014-03-30stmhal: Implement selector for USB device mode; improve boot up.Damien George
Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID. Choice is made by an option in boot.py, with default being CDC+MSC. HID+MSC is not currently supported, but should be easy to implement. Boot up now has ability to change the reset mode: hold down USR switch while booting and LEDs will count from 1 to 7 to indicate the boot mode. Release USR when correct mode is selected. Current modes are 1 (normal boot), 2 (safe mode), 3 (reset FS mode).
2014-03-29stmhal: Factor out stdio and readline to separate files.Damien George
Adds readline_init() to clear readline history on soft reset. Addresses issue #387.
2014-03-25stmhal: Add I2C support; change accel driver to use new I2C.Damien George
2014-03-25Proper support for registering builtin modules in ROM.Damien George
Comes with some refactoring of code and renaming of files. All modules are now named mod*.[ch].
2014-03-24stmhal - fixed up adc stuffDave Hylands
Added support for the ADC channels and mappings to make_pins.py I'm not sure if the hal properly deals with the channel 16/18 differences between the 40x and 42x. It seems to deal with it partially. This particular aspect will need testing on a 42x or 43x.
2014-03-24stmhal: Add DAC driver.Damien George
2014-03-24stmhal: Update help function.Damien George
2014-03-22stmhal: Add input() and pyb.input() functions.Damien George
2014-03-22stmhal: Add servo driver.Damien George
2014-03-22stmhal: Add time module with sleep function.Damien George
2014-03-22stmhal: Add os module with a few basic functions.Damien George
2014-03-22stmhal: Add PYBv10 config; add RNG support.Damien George
2014-03-22stmhal: USB CDC and MSC device work together.Damien George
2014-03-21stmhal: Add support for USB MSC device.Damien George
This gives a functioning, independent MSC device.
2014-03-20stmhal: Add accelerometer driver; fix bug with LFN.Damien George
2014-03-19stmhal: Add lcd.c to Makefile, and init LCD in main.Damien George
2014-03-17stmhal: Add fatfs support, working with flash and SD card.Damien George
2014-03-17stmhal: Add flash write support and flash storage driver.Damien George
2014-03-17stmhal: Add SD card support.Damien George
Just low-level read/write support. No filesystem yet.
2014-03-15stmhal: Get RTC working.Damien George
2014-03-15stmhal: Get USB CDC REPL working.Damien George
New USB HAL is quite a bit improved over previous one. Now has better callbacks and flow control. REPL over USB CDC now works as before, except for soft-reset (since USB driver uses malloc...).
2014-03-14stmhal - add pin mapping, gpio, exti, usrswDave Hylands
2014-03-14stmhal: Get USB enumerating a CDC device.Damien George
Enumerates CDC device over USB, but doesn't transmit/receive yet.
2014-03-13Cleanup systick for stmhalDave Hylands