| Age | Commit message (Collapse) | Author |
|
|
|
Add pin mapping code.
|
|
|
|
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.
|
|
To follow up pull request #309.
|
|
stm: Initialize sys.path with ["0:/", "0:/src", "0:/lib"].
|
|
This is compatible with what search path was before sys.path refactor,
with addition of module library path ("0:/lib").
|
|
|
|
|
|
GPIO functions are crude, and need to be replaced with better ones!
|
|
|
|
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.
|
|
In particular, unix outputs to stderr, to allow to run testsuite against
micropython built with debug output (by redirecting stderr to /dev/null).
|
|
Addresses issue #299.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
For some reason, STM port, while it's 32 bit, needs %lu and %ld for
printing machine_uint_t and machine_int_t.
|
|
Enable GC for Unix port
|
|
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.
|
|
|
|
|
|
Addresses issue #275.
|
|
|
|
Addresses issues #272 and #273.
|
|
If there's malloc and memset, then there's no need for calloc, especially if
we need to implement it ourselves.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
This also fixes up the IRQ for the PYBOARD4 USERSW
although I was unable to test that functionality.
|
|
Conflicts:
stm/usb.c
stm/usb.h
|
|
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.
|
|
|
|
* Detect VCP line state, based on SET_CONTROL_LINE_STATE request
|
|
|
|
|
|
|
|
* Add SD card test to fix warning
|
|
* Remove include mpconfigport.h from file.c
|
|
* Issue #232
|
|
|
|
|
|
|
|
* Add missing LCD definitions for STM32F4DISC target, current code
breaks build.
|
|
|
|
|