Commit Graph

122 Commits (43d56f9ba93b2f3a889f024b250f39335cf18bb7)

Author SHA1 Message Date
Daniel Campora df5d9c77f4 cc3200: Fix bootloader and modpyb after printf overhaul.
The bootloader needs string0.c because of memset, memcpy and others,
without string0.c it magically links, but calling any of those
functions results in a hard fault.
In debug mode, modpyb needs printf, and including stdio.h leads to
conflicts due to the redefinitions made in the simplelink drivers.
2015-04-19 20:59:10 +02:00
Damien George 259eaab9a9 cc3200: Clean up and reduce use/include of std.h. 2015-04-18 14:29:28 +01:00
Daniel Campora c1a77a0c9f cc3200: Use new %q format to print qstr's where appropiate. 2015-04-17 10:15:55 +02:00
Daniel Campora 2cd247e819 cc3200: Clean up bootloader makefile and remove superflous assert. 2015-04-17 09:55:24 +02:00
Damien George a86d40ccd4 cc3200: Get bootloader compiling with latest overhaul of printf code. 2015-04-16 14:30:17 +00:00
Damien George 7f9d1d6ab9 py: Overhaul and simplify printf/pfenv mechanism.
Previous to this patch the printing mechanism was a bit of a tangled
mess.  This patch attempts to consolidate printing into one interface.

All (non-debug) printing now uses the mp_print* family of functions,
mainly mp_printf.  All these functions take an mp_print_t structure as
their first argument, and this structure defines the printing backend
through the "print_strn" function of said structure.

Printing from the uPy core can reach the platform-defined print code via
two paths: either through mp_sys_stdout_obj (defined pert port) in
conjunction with mp_stream_write; or through the mp_plat_print structure
which uses the MP_PLAT_PRINT_STRN macro to define how string are printed
on the platform.  The former is only used when MICROPY_PY_IO is defined.

With this new scheme printing is generally more efficient (less layers
to go through, less arguments to pass), and, given an mp_print_t*
structure, one can call mp_print_str for efficiency instead of
mp_printf("%s", ...).  Code size is also reduced by around 200 bytes on
Thumb2 archs.
2015-04-16 14:30:16 +00:00
Daniel Campora 4c37489f4c cc3200: Correct the IP address byte order in the FTP server. 2015-04-14 01:57:29 +02:00
Daniel Campora f7a26472af cc3200: Add IPPROTO_SEC to be able to create secure sockets. 2015-04-14 01:57:27 +02:00
Daniel Campora 99f7184073 cc3200: Disable MICROPY_COMP_TRIPLE_TUPLE_ASSIGN.
Because it's only a compiler optimization and increases code size.
2015-04-13 00:03:41 +02:00
Daniel Campora c69b4310c8 cc3200: Add WLAN.config_ip().
This new method allows to assign an static IP to the device.
2015-04-13 00:02:56 +02:00
Daniel Campora d278e49475 cc3200: Enable TRIPLE_TUPLE_ASSIGN and UBINASCII. 2015-04-11 13:35:07 +02:00
Daniel Campora 6e25d955f4 cc3200: Enable long filename support in FatFS.
This has implications all over the place. I have to admit that
you can instantly see that usability improves, but it costs 3K.
At the same time I took the oportunity to rename the '/SFLASH'
drive to '/flash' which improves compatibility with the pyboard.
2015-04-11 13:35:05 +02:00
Daniel Campora 18bd51707c cc3200: Enable the stdio UART for the LaunchXL only. 2015-04-07 12:12:16 +02:00
Daniel Campora c7acfc90b9 cc3200: Enable pull-ups for the STDIO UART pins. 2015-04-07 10:50:20 +02:00
Paul Sokolovsky 96b60ed956 cc3200: Fix typo after previous refactor. 2015-04-05 22:32:41 +03:00
Paul Sokolovsky 3a84c8b58d string0.c: Move from stmhal/ to lib/. 2015-04-05 21:57:55 +03:00
Daniel Campora b9d850227d cc3200: Add WLAN AP specific settings for each board. 2015-04-04 22:09:55 +02:00
Daniel Campora d460a30711 cc3200: Add specific version file for the CC3200 port.
Current version has been numbered as 0.9.0 since Timers/PWM support
is still missing.
2015-03-31 14:34:09 +02:00
Daniel Campora 3f42f32648 cc3200: Remove duplicated code from moduos.
Error reporting is also changed from detailed to terse, as with the
rest of the CC3200's modules. All this combined saves ~200 bytes.
2015-03-31 14:34:07 +02:00
Daniel Campora 7b19e99edd lib: Update FatFs to R0.11.
There are lots of cosmetic changes, but this release brings a  very
important bug fix:
 - Fixed f_unlink() does not remove cluster chain of the file.

With R0.10c if you try to write a file that is too large to fit in the
free space of the drive, the operation fails, you delete the incomplete
file, and it seems to be erased, but the space is not really freed,
because any subsequent write operations fail because the drive is
"still" full. The only way to recover from this is by formatting the
drive. I can confirm that R0.11 fixes the problem.
2015-03-29 22:12:14 +01:00
Daniel Campora 1eba62cac9 cc3200: Remove unneeded SPI instruction in the simplelink driver.
Setting the word count before a SPI transaction is only needed when
using DMA.
2015-03-26 20:50:39 +01:00
Daniel Campora 1826036a83 cc3200: Increase main stack size to 2K.
Increasing it from 1K to 2K gives more freedom to the callback
handlers, before this, simply nesting a function call into a
printf would cause a stack overflow.
2015-03-26 20:50:38 +01:00
Daniel Campora 760a6eca9b cc3200: Minor refactorings on modwlan and pybsleep. 2015-03-26 14:27:21 +01:00
Daniel Campora 4be44014ab cc3200: Reenable active interrupts when waking from suspended mode. 2015-03-26 13:58:58 +01:00
Daniel Campora 2d717ad97a cc3200: Add callback support to the UART for RX interrupts. 2015-03-26 10:28:43 +01:00
Daniel Campora e909e38871 cc3200: Remove superflous parameters from the SPI API. 2015-03-26 10:28:41 +01:00
Daniel Campora 7f41f650de cc3200: Remove superflous params from the I2C API. 2015-03-25 16:56:14 +01:00
Daniel Campora 26d230419c cc3200: Add GPIO25 to the pins list of the WiPy and the WiPy-SD.
This allows to properly initialize the system led and add it
to the sleep module so that it can be restored when resuming
from suspended mode.
2015-03-25 15:22:32 +01:00
Daniel Campora 4729a212b1 cc3200: Rename the WiPy_SD to WiPy-SD. 2015-03-25 15:22:27 +01:00
Daniel Campora 684dba40f0 cc3200: Roll back to the previous telnet and ftp timeouts.
Unfortunately, these timeouts are the only realiable way (for now), to
be able to detect broken connections due to half-open sockets. Such a
thing occurs when getting out of the WiFi coverage area or when
disconnecting from the AP (sometimes the client doesn't send the
disconnect packet).
2015-03-25 15:22:21 +01:00
Daniel Campora e15f8198bc cc3200: Keep WLAN enabled during the soft reset. 2015-03-25 15:22:16 +01:00
Daniel Campora 9d3588f2be cc3200: Remove the cc3200.xml file. Latest CCS already ships with it. 2015-03-25 15:22:11 +01:00
danicampora 104a867447 cc3200: Fix bug in telnet that caused the rx buffer to overflow. 2015-03-22 11:32:12 +01:00
danicampora 59f6831336 cc3200: Reduce soft reset time. WLAN is not reinit, just reenabled. 2015-03-21 11:31:29 +01:00
danicampora 77791b5633 cc3200: Improve usability and robustness of the servers. 2015-03-21 11:31:17 +01:00
danicampora c1c23e2f6a cc3200: Remove superfluous code in pybsleep. 2015-03-21 11:27:26 +01:00
danicampora cd9bc14c8f cc3200: Add SPI module.
Only MASTER mode is supported. Transfer width is configurable to
8, 16 or 32 bits.
2015-03-21 11:26:47 +01:00
danicampora c45e641c1d cc3200: Re-name pybsystick to mpsystick. 2015-03-21 11:21:45 +01:00
danicampora f8ee88bbe0 cc3200: Move server methods from WLAN to the network module. 2015-03-19 17:08:25 +01:00
danicampora 0e96d1b3f1 cc3200: Add parameter to wlan_stop() for custom timeout values. 2015-03-18 21:55:08 +01:00
danicampora f382f4442e cc3200: Fixes and improvements to the SD card driver. 2015-03-18 21:55:02 +01:00
danicampora 963d7c7ee6 cc3200: Refactor I2C. Remove all references to SLAVE mode. 2015-03-18 21:54:41 +01:00
danicampora d3912549a3 cc3200: Improve I2C timeout handling. 2015-03-18 21:54:30 +01:00
danicampora 005a7f4190 cc3200: Fix extint_enable behaviour when the callback is updated. 2015-03-17 13:26:09 +01:00
danicampora 181fe5016c cc3200: Add RTC callback with wake-up from sleep capability. 2015-03-17 13:26:08 +01:00
danicampora 6de1b39368 cc3200: Make peripheral objects static.
This prevents duplication of objects in the sleep list. Also helps
with reducing the code size by ~100 bytes.
2015-03-17 13:26:07 +01:00
danicampora fcf6db0695 cc3200: Register pybsd with the sleep module and use pin_config(). 2015-03-17 13:26:06 +01:00
danicampora 98b8568362 cc3200: Assign GPIO10 and GPIO11 to the GPIO peripheral on start-up. 2015-03-17 13:26:05 +01:00
danicampora ea43fa104e cc3200: Remove unneeded functions and add pybsleep_remove() calls. 2015-03-17 13:26:03 +01:00
danicampora 78d7c45b69 cc3200: Disable all wake sources on start-up. 2015-03-16 00:42:16 +01:00