aboutsummaryrefslogtreecommitdiff
path: root/stmhal
AgeCommit message (Collapse)Author
2014-04-12stmhal: Put a USB structure in ROM; GC doesn't scan the data segment.Damien George
2014-04-12stmhal: Move fatfs volume/partition lookup table to ROM.Damien George
2014-04-12stmhal: Move I2C objects to ROM.Damien George
2014-04-10Merge pull request #458 from lurch/patch-1Damien George
Tweak pybcdc.inf to match recent changes to pybcdc.h
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-10Tweak pybcdc.inf to match recent changes to pybcdc.hAndrew Scheller
2014-04-09stmhal: Make /src/main.py just /main.py; allow SD to be used as root device.Damien George
2014-04-09stmhal: Update windows driver; \r\n newlines and addition USB id.Damien George
2014-04-09stmhal: Add windows cdc .inf driver to flash filesystem.Damien George
2014-04-09stmhal: Improve help() function.Damien George
2014-04-09stmhal: Add functionality to Servo object.Damien George
Can now calibrate, set pulse width, angle and speed.
2014-04-08Fix make-pins.py to support having multiple names for a pin.Dave Hylands
SW and X17 now both map to PB3
2014-04-08stmhal: Make USRSW re-register the EXTI callback each time it's set.Damien George
2014-04-08stmhal: in EXTI interrupt handler wrap uPy calls in gc_lock and nlr_buf.Damien George
2014-04-08Add a check for NULL nlr_top in nlr_jump.Damien George
If no nlr_buf has been pushed, and an nlr_jump is called, then control is transferred to nlr_jump_fail (which should bail out with a fatal error).
2014-04-08Improve REPL detecting when input needs to continue.Damien George
Full CPython compatibility with this requires actually parsing the input so far collected, and if it fails parsing due to lack of tokens, then continue collecting input. It's not worth doing it this way. Not having compatibility at this level does not hurt the goals of Micro Python.
2014-04-08unix, stmhal: Consistently use "FileIO" as class name for file objects.Paul Sokolovsky
They correspond to io.FileIO in io module hierarchy (with small caveat that io.FileIO is raw file and works with bytes, not strings).
2014-04-07Replace some Makefile commands with variables in py/mkenv.mkAndrew Scheller
2014-04-06py: Add option to compiler to specify default code emitter.Damien George
Also add command line option to unix port to select emitter.
2014-04-05py: Replace stream_p with *stream_p in mp_obj_type_t.Damien George
This is to reduce ROM usage. stream_p is used in file and socket types only (at the moment), so seems a good idea to make the protocol functions a pointer instead of the actual structure. It saves 308 bytes of ROM in the stmhal/ port, 928 in unix/.
2014-04-05py: Make globals and locals proper dictionary objects.Damien George
Finishes addressing issue #424. In the end this was a very neat refactor that now makes things a lot more consistent across the py code base. It allowed some simplifications in certain places, now that everything is a dict object. Also converted builtins tables to dictionaries. This will be useful when we need to turn builtins into a proper module.
2014-04-05py: Change module globals from mp_map_t* to mp_obj_dict_t*.Damien George
Towards addressing issue #424. Had a small increase to ROM usage (order 60 bytes).
2014-04-05Improve GC finalisation code; add option to disable it.Damien George
2014-04-05py: Change nlr_jump to nlr_raise, to aid in debugging.Damien George
This does not affect code size or performance when debugging turned off. To address issue #420.
2014-04-05stmhal: autoflash now enters serial comms after flashing.Damien George
2014-04-05stmhal: Add more escape seqs; add debugging output for escape seq.Damien George
2014-04-05stmhal readline: Parse XTERM Home/End key codes.Paul Sokolovsky
Which are ESC O H, ESC O F.
2014-04-03Add the git version to the bannerDave Hylands
2014-04-03stmhal: Add home/end cursor support in readline.Damien George
Home/end work in picocom and screen (different codes in those 2 programs). Also, CTRL-A (for non-empty liny) and CTRL-E act as home/end.
2014-04-03Merge pull request #419 from pfalcon/stmhal-file-streamsDamien George
stmhal: Reimplement file support using stream protocol API.
2014-04-03stmhal: On soft reset, if in raw REPL mode, don't run main.py.Damien George
2014-04-03stmhal: Fix raw REPL so that it passes through more ASCII chars.Damien George
2014-04-03stmhal: Add powf, logf, log2f, log10f.Damien George
2014-04-03stmhal: #undef log2f if it's defined.Damien George
2014-04-03stmhal: Reimplement file support using stream protocol API.Paul Sokolovsky
This adds readline(), readall(), etc. methods. Also other fixes to make Python API compliant and "with" support.
2014-04-02stmhal: Fix servo object; add fpclassify to math functions.Damien George
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-04-02stmhal: Add backspace key to readline (along with delete key).Damien George
2014-04-01Fix pyb.Led(n) code to work properly.Dave Hylands
2014-04-01Enhance str.format supportDave Hylands
This adds support for almost everything (the comma isn't currently supported). The "unspecified" type with floats also doesn't behave exactly like python. Tested under unix with float and double Spot tested on stmhal
2014-03-31py: Remove old "run time" functions that were 1 liners.Damien George
2014-03-30Merge map.h into obj.h.Damien George
Pretty much everyone needs to include map.h, since it's such an integral part of the Micro Python object implementation. Thus, the definitions are now in obj.h instead. map.h is removed.
2014-03-30Rename rt_* to mp_*.Damien George
Mostly just a global search and replace. Except rt_is_true which becomes mp_obj_is_true. Still would like to tidy up some of the names, but this will do for now.
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: Add CDC+HID USB device.Damien George
The HID device must appear before the CDC in order for both to work at the same time. Whilst the code is working, it's not currently used.
2014-03-29stmhal: Add Windows .inf file for USB CDC device.Damien George
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-29py: Rename old const type objects to mp_type_* for consistency.Damien George
2014-03-29stmhal: Add TODO's to exti.c; fix delay in lcd.c.Damien George