Updated Board Teensy3.1 (markdown)

master
Dave Hylands 2016-10-13 13:47:34 -07:00
rodzic 4fa50a584e
commit e6dcc2d663
2 zmienionych plików z 67 dodań i 48 usunięć

@ -0,0 +1,67 @@
Cortex M4 based
* [Teensy 3.1/3.2](http://www.pjrc.com/store/teensy31.html)
* [Teensy 3.5](http://www.pjrc.com/store/teensy35.html)
* [Teensy 3.6](http://www.pjrc.com/store/teensy36.html)
##Features##
### Teensy 3.1
* MK20DX256VLH7 72MHz
* 256K Flash, 64kB RAM
* 34 pins available for digitial I/O
* 21 pins availale for analog 16-bit A/D
* 12 timers, 12 PWM
* 3xUART
* SPI, I2C, CAN
### Teensy 3.5
* [MK64FX512VMD12](http://www.nxp.com/files/microcontrollers/doc/ref_manual/K64P144M120SF5RM.pdf) 120 MHz
* 512K flash,
* 57 pins available for digital I/O (5v tolerant)
* 24 pins available for analog 13-bit A/D
* 14 timers, 20 PWM
* 6xUART
* 3xSPI, 3xI2C, 2xCAN, 16xDMA
* RTC
* 2 DAC channels
* SD card
### Teensy 3.6
* [MK64FX512VMD12](http://www.nxp.com/files/32bit/doc/ref_manual/K66P144M180SF5RMV2.pdf) 180 MHz
* 1M flash, 256K RAM, 4K EEPROM
* 57 pins available for digital I/O (NOT 5v tolerant)
* 26 pins available for analog 13-bit A/D
* USB High Speed OTG port
* 14 timers, 22 PWM
* 6xUART
* 3xSPI, 4xI2C, 2xCAN, 32xDMA
* RTC
* 2 DAC channels
* SD card
###Status###
1. Work has started on porting to this chip. See [repo](https://github.com/micropython/micropython/tree/master/teensy) Aug 3, 2014 - https://github.com/micropython/micropython/pull/786 compiles and builds for teensy.
###Building###
To build, you can either use the ARM toolchain from [here](https://launchpad.net/gcc-arm-embedded) (add to your PATH), or you can use the ARM toolchain included with Arduino/Teensyduino (set ARDUINO environment variable to point to the root of your arduino/teensyduino tree).
```
git clone https://github.com/micropython/micropython
cd micropython/teensy
make BOARD=TEENSY_3.1
```
BOARD can be one of TEENSY_3.1, TEENSY_3.5, or TEENSY_3.6. If no BOARD is specified, then TEENSY_3.1 will be assumed.
### Flashing
The firmware will be in build-TEENSY_3.1/micropython.hex (replace TEENSY_3.1 appropriately).
You can flash using [teensy_loader_cli](https://github.com/PaulStoffregen/teensy_loader_cli) or by using the flashing tools included with teensyduino but setting ARDUINO to point to the arduino/teensyduino tree.
```
make BOARD=TEENSY_3.6 deploy
```
###Running Scripts
Currently, scripts must be compiled into the firmware image. Place your .py files into the teensy/memzip_files directory and they'll be built into your firmware image.
The sample memzip_files includes a boot.py and main.py. The default main.py flashes the LED twice.
If you want to update a script, you'll need to rebuild and reflash the firmware.

@ -1,48 +0,0 @@
Cortex M4 based MK20DX256VLH7
* [Teensy](http://www.pjrc.com/teensy/teensy31.html)
###Features###
* MK20DX256VLH7 72MHz
* 256K Flash, 64kB RAM
* 34 pins available for digitial I/O
* 21 pins availale for Analog 2x 16bit A/D
* 12 timers, 12 PWM
* SPI, i2c, CANbus
###Status###
1. Work has started on porting to this chip. See [repo](https://github.com/micropython/micropython/tree/master/teensy) Aug 3, 2014 - https://github.com/micropython/micropython/pull/786 compiles and builds for teensy.
###Building###
* You shouldn't need to install teensyduino to build (you will need teensyduino to flash the image)
* You will need to install realpath (this is currently used by add-memzip.sh)
* The deploy target (which flashes the firmware onto the Teensy 3.1) needs to use the bootloader from teensyduino. The Makefile needs the ARDUINO environment variable setup to point to the root of you teensyduino (aka arduino) installation tree. More specifically, the bootloader is found using $(ARDUINO)/hardware/tools/teensy_post_compile is the name of the bootloader.
NOTE: One convenient way of setting the ARDUINO environment variable is to create a GNUmakefile (note that GNUmakefile is spelled with a lowercase m) which looks like this:
```make
$(info Running GNUmakefile)
ARDUINO = /home/dhylands/arduino-1.0.5
include Makefile
```
then when you use GNU make, it will automatically use GNUmakefile instead of Makefile, which allows you to put in user-specific customizations.
###Running Scripts###
Due to memory limitations (the teensy has 256K flash, and micropython currently consumes about 201K) the USB Mass Storage feature of the stmhal build couldn't be supported.
So I introduced something called memzip. This is a zip file which contains uncompressed files. The build system takes all of the files located in $(MEMZIP_DIR) (which you can specify in GNUmakefile as mentioned above for the ARDUINO variable) and this directory tree becomes your filesystem for MicroPython. The sample memzip_files includes a boot.py and main.py. The default main.py flashes the LED twice.
If you want to update a script, you'll need to rebuild and reflash the firmware.
###What's currently supported###
* pyb.delay()
* pyb.disable_irq()
* pyb.enable_irq()
* pyb.freq()
* pyb.have_cdc()
* pyb.info()
* pyb.udelay()
* pyb.unique_id()
* pyb.LED
* pyb.Pin
* pyb.UART