aboutsummaryrefslogtreecommitdiff
path: root/stm
AgeCommit message (Collapse)Author
2014-02-19stm: Update PYBOARD4 pin mapping.Damien George
2014-02-19Merge pull request #310 from dhylands/pin_mapDamien George
Add pin mapping code.
2014-02-19stm: Add RTC start-up info, and uPy bindings.Damien George
2014-02-17Add pin mapping code.Dave Hylands
This commit also introduces board directories and moves board specific config into the appropriate board directory. boards/stm32f4xx-af.csv was extracted from the STM32F4xx datasheet and hand-tweaked. make-pins.py takes boards/stm32f4xx-af.csv, boards/stm32f4xx-prefix.c, and boards/BOARD-NAME/pins.csv as input and generates the file build/pins_BOARD_NAME.c The generated pin file for PYBOARD4 looks like this: https://gist.github.com/dhylands/9063231 The generated pins file includes all of the supported alternate functions, and includes upsupported alternate functions as comments. See the commnet block at the top of stm/pin_map.c for details on how to use the pin mapper. I also went ahead and modified stm/gpio.c to use the pin mapper.
2014-02-17stm: Implement mp_import_stat.Damien George
To follow up pull request #309.
2014-02-17Merge pull request #309 from pfalcon/stm-sys-pathDamien George
stm: Initialize sys.path with ["0:/", "0:/src", "0:/lib"].
2014-02-18stm: Initialize sys.path with ["0:/", "0:/src", "0:/lib"].Paul Sokolovsky
This is compatible with what search path was before sys.path refactor, with addition of module library path ("0:/lib").
2014-02-17Fix usart_obj_tx_charmux
2014-02-16Fix build for netduino and stm32f4discDave Hylands
2014-02-16stm: Factor out GPIO code to its own file. Add functions to set GPIO mode.Damien George
GPIO functions are crude, and need to be replaced with better ones!
2014-02-16stm: Rename mma -> accel.Damien George
2014-02-16stm: Put REPL functions in own file; add raw REPL mode.Damien George
Raw REPL mode is activated by CTRL-A, and allows you to more easily communicate with the pyboard over the serial channel. In particular, automated communication using, eg, pyserial on the PC side.
2014-02-16Make DEBUG_printf() a proper function, implementation is port-dependent.Paul Sokolovsky
In particular, unix outputs to stderr, to allow to run testsuite against micropython built with debug output (by redirecting stderr to /dev/null).
2014-02-16stm: Only define __packed if not already defined.Damien George
Addresses issue #299.
2014-02-15Implement proper exception type hierarchy.Damien George
Each built-in exception is now a type, with base type BaseException. C exceptions are created by passing a pointer to the exception type to make an instance of. When raising an exception from the VM, an instance is created automatically if an exception type is raised (as opposed to an exception instance). Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper. Handling of parse error changed to match new exceptions. mp_const_type renamed to mp_type_type for consistency.
2014-02-15Change mp_obj_type_t.name from const char * to qstr.Damien George
Ultimately all static strings should be qstr. This entry in the type structure is only used for printing error messages (to tell the type of the bad argument), and printing objects that don't supply a .print method.
2014-02-13stm: If SD card inserted on hard reset, it is the medium for USB MSD.Damien George
2014-02-12Remove mp_obj_new_exception_msg_1_arg and _2_arg.Damien George
2014-02-12stm: Copy COPT style from unix port.Damien George
2014-02-11stm: Add specific UINT_FMT and INT_FMT.Damien George
For some reason, STM port, while it's 32 bit, needs %lu and %ld for printing machine_uint_t and machine_int_t.
2014-02-11Merge pull request #278 from pfalcon/unix-gcDamien George
Enable GC for Unix port
2014-02-11stm: Provide malloc()/realloc()/free(), as forwarding to gc_*() functions.Paul Sokolovsky
Note: none of these functions are used by STM port, so they're provided to have parity with pre gc refactor status quo, and in case they will be needed in the future by some extension writers.
2014-02-11Generalize malloc-via-gc-heap support, make it available to unix port.Paul Sokolovsky
2014-02-11Enable link map file generation.Paul Sokolovsky
2014-02-10stm: Remove unused, useless and not-to-be-used strndup.Damien George
Addresses issue #275.
2014-02-10Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-02-10stm: Tidy up memory labels; optimise GC root scanning.Damien George
Addresses issues #272 and #273.
2014-02-10Get rid of calloc().Paul Sokolovsky
If there's malloc and memset, then there's no need for calloc, especially if we need to implement it ourselves.
2014-02-08Make mp_obj_str_get_data return char* instead of byte*.Damien George
Can't decide which is better for string type, char or byte pointer. Changing to char removes a few casts. Really need to do proper unicode.
2014-02-08stm: Mount SD card on 1:/ if present.Damien George
If SD card is present on (soft) reset then it's mounted on 1:/ and files can be openned using, eg, open('1:/test.txt', 'r'), or 'w' for writing.
2014-02-06Implement fixed buffer vstrs; use them for import path.Damien George
2014-02-05Search paths properly on import and execute __init__.py if it exists.Damien George
2014-02-05Remove older import helpers, no longer used.Paul Sokolovsky
2014-02-03Initial support for NetduinoDave Hylands
This also fixes up the IRQ for the PYBOARD4 USERSW although I was unable to test that functionality.
2014-02-01Merge branch 'iabdalkader-master'Damien George
Conflicts: stm/usb.c stm/usb.h
2014-02-01stm: Add support for ctrl-C to interrupt running Python.Damien George
Using PendSV interrupt at lowest priority, code can now raise an exception during an interrupt by calling pendsv_nlr_jump. The exception will be raised when all interrupts are finished. This is used to trap ctrl-C from the USB VCP to break out of running Python code.
2014-02-01Add usb_vcp_connected prototype to usb.hmux
2014-02-01Detect VCP line state.mux
* Detect VCP line state, based on SET_CONTROL_LINE_STATE request
2014-01-30Fix Makefiles: -O3 option was not being applied; mkdir for STM.Damien George
2014-01-29stm: Add optional memory debugging output.Damien George
2014-01-29stm: Fix gccollect ram range.Damien George
2014-01-29Fix unused function warning in mainmux
* Add SD card test to fix warning
2014-01-29Remove redundant include in file.cmux
* Remove include mpconfigport.h from file.c
2014-01-29Move HEAP_END and RAM_END to linker scriptmux
* Issue #232
2014-01-28stm: Increase timeout for RTC LSE startup; use backup regs.Damien George
2014-01-27stm: Remove unneccesary include of mpconfigport (already in mpconfig).Damien George
2014-01-27Add LCD check to stdout_print_strnmux
2014-01-27Add missing LCD driver definitions for STM32F4DISCmux
* Add missing LCD definitions for STM32F4DISC target, current code breaks build.
2014-01-26stm: USB host mode working! Restructure stm library directories.Damien George
2014-01-25stm: Improved ADC module; add BOARD_NAME config value.Damien George