Commit Graph

239 Commits

Author SHA1 Message Date
Noralf Trønnes
28383afa11 shared-module/os: Fix os.mkdir('a/b')
This fixes commit a99f9427420d("'/' and '\' are also acceptable ends of the path now") which broke mkdir.
The problem is where the directory name is a single letter like this:
>>> os.mkdir('a')
>>> os.mkdir('a/b')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 17] File exists
>>> os.mkdir('a/bb')
>>>

I wasn't smart enough to fix this in the oofatfs library, so I did it in the os shared module by
creating a path lookup function for the os methods that only deals with directories. I reverted
the library change introduced by the aforementioned commit.

This means that os.stat and os.rename can't handle trailing slashes. This is to avoid allowing
filenames with trailing slashes to pass through. In order to handle trailing slashes for these
it would be necessary to check if it really is a directory before stripping. I didn't do this
since the original issue was to make os.chdir tolerate trailing slashes.

There's an open MicroPython issue #2929 wrt. trailing slashes and mkdir.
2018-11-09 19:20:56 +01:00
hathach
21ddb6b9b9 fix tinyusb cdc issue 2018-10-05 21:37:16 +07:00
hathach
d3e5ba83eb update nrfx to 1.3.0 2018-09-25 13:00:57 +07:00
Jeff Epler
014857b34b uzlib: Upgrade to uzlib v2.9 release
This fixes a large number of crashes on malformed inputs.
2018-09-09 20:22:25 -05:00
Dan Halbert
93100a7517
Merge pull request #1146 from hathach/nrf52_usb_serial_bug
update tinyusb to fix #1007 serial issue
2018-08-28 15:39:34 -04:00
hathach
ba26ca9e41 update tinyusb to fix #1007 serial issue 2018-08-28 16:00:34 +07:00
Noralf Trønnes
39ee12d1ac Fix os.stat() to use 1970 epoch
Commit 95e70cd0ea 'time: Use 1970 epoch' changed epoch for the time
module, but not for other users. This patch does the same for the only
other core timeutils user: extmod/vfs_fat.c:fat_vfs_stat().
Other timeutils users: cc3200, esp8266 and stm32, are not changed.

Ports that don't use long ints, will still get wrong time values from
os.stat().
2018-08-25 20:43:02 +02:00
hathach
02b1b53153 Merge branch 'master' into nrf52_dfu_touch1200 2018-08-22 15:24:12 +07:00
hathach
b7dd33b76e add touch 1200 for dfu-flash 2018-08-21 15:15:44 +07:00
Scott Shawcroft
4a4d84ba42
Merge pull request #1064 from notro/i2cslave
Add busio.I2CSlave
2018-08-17 16:51:45 -07:00
Scott Shawcroft
2cd166b573
Fix esp and samd 2018-08-16 17:41:35 -07:00
Noralf Trønnes
1ed0e45fc2 Add i2cslave.I2CSlave bindings 2018-08-16 17:11:20 +02:00
Scott Shawcroft
96ebf5bc3f
Two fixes and translate more strings.
* Fix finding translations with escaped characters.
* Add back \r to translations since its needed by screen.
2018-08-09 13:29:30 -07:00
hathach
1e524f1b98 Merge branch 'master' into nrf52840_usb_hid 2018-08-01 00:58:23 +07:00
hathach
20c25f61d9 update tinyusb 2018-08-01 00:53:56 +07:00
hathach
d15caf0dbd hid keyboard and mouse work well 2018-07-31 16:42:04 +07:00
hathach
221d54a595 workaround to use lib/utils/interrupt_char.c 2018-07-31 14:28:34 +07:00
hathach
ae783b0b1a update tinyusb, set scsi sense key for unsupported commands 2018-07-31 13:54:58 +07:00
Scott Shawcroft
a6d94b6845
Merge pull request #1068 from dhalbert/micropython-25ae98f-merge
Micropython 25ae98f merge
2018-07-30 12:33:44 -07:00
Dan Halbert
2e260a0eab Merge remote-tracking branch 'adafruit/master' into micropython-25ae98f-merge 2018-07-28 14:13:54 -04:00
Dan Halbert
f48b70050e merge finished 2018-07-28 13:29:47 -04:00
Leszek Jakubowski
a99f942742 '/' and '\' are also acceptable ends of the path now 2018-07-28 17:07:22 +02:00
hathach
21339c4155 house keeping 2018-07-27 17:22:21 +07:00
hathach
e86f7d0b88 add usb msc callback description 2018-07-27 00:17:14 +07:00
hathach
5bdf40901f update tusb lib 2018-07-26 17:16:41 +07:00
Dan Halbert
bc760dd341 WIP: complete manual inspection of all significant changes 2018-07-23 21:34:25 -04:00
hathach
bb28faf39c arturo182 review 2018-07-17 23:57:49 +07:00
hathach
3525d65af3 should fix #1021
- update tinyusb for wanted char
- move usb code into usb.c
2018-07-17 21:24:49 +07:00
Dan Halbert
2809b4f9dd Merge branch 'master' into micropython-25ae98f-merge 2018-07-16 19:36:40 -04:00
Dan Halbert
7c219600a2 WIP: after merge; before testing 2018-07-11 16:45:30 -04:00
hathach
a53b1c7cf1 code format 2018-07-10 22:49:51 +07:00
hathach
ce01496d44 try to fix travis build error 2018-07-10 12:06:54 +07:00
hathach
0e819599e7 Merge branch 'master' into nrf52840_usbboot 2018-07-10 02:02:52 +07:00
hathach
c5089d7274 generate uf2 by default
update tusb
2018-07-10 01:02:33 +07:00
hathach
0365912e28 implement msc with internal_flash api
Note: only work with SD is disabled.
2018-07-05 16:19:04 +07:00
hathach
7fff7f5e70 add usb msc support for nrf52840 2018-07-04 16:40:53 +07:00
hathach
a73effa5b6 update tusb 2018-07-04 00:28:43 +07:00
Scott Shawcroft
519287550c
Long-live code.py itself. 2018-07-03 05:45:50 -07:00
hathach
36e2f38933 update tools/uf2 to have family support 2018-07-03 17:49:59 +07:00
hathach
46c453cf0a add tinyusb as submodule 2018-07-03 17:46:08 +07:00
Damien George
191e2cf90a lib/stm32lib: Update library to include support for STM32F0 MCUs.
Now points to branch: work-F0-1.9.0+F4-1.16.0+F7-1.7.0+H7-1.2.0+L4-1.8.1
2018-05-28 21:46:20 +10:00
hathach
52ebfd07a5 update nrfutil to 0.5.2d with singlebank option 2018-05-17 15:20:07 +07:00
Damien George
7d7b9cd5df lib/lwip: Update lwIP to v2.0.3, tag STABLE-2_0_3_RELEASE. 2018-05-17 13:11:31 +10:00
Jeff Epler
a6072f7ae3 uzlib: convert to submodule
Textualy, the files in lib/uzlib/src were identical to the ones committed
in extmod/uzlib so there should be no behavioral change possible as a
result of this commit.
2018-05-07 20:03:30 -05:00
Scott Shawcroft
7dd1d6afcc Prevent a heap pointer from living on the stack longer than we need. 2018-04-09 16:02:32 -07:00
Damien George
23f07b77e5 lib/stm32lib: Update library for fix to H7 SPI strict aliasing error. 2018-03-25 23:58:56 +11:00
Damien George
e22ef277b8 lib/stm32lib: Update library to include support for STM32H7 MCUs.
Now points to the branch: work-F4-1.16.0+F7-1.7.0+H7-1.2.0+L4-1.8.1
2018-03-09 14:31:34 +11:00
microbuilder
ea30622318 Updated nrfutil to 0.5.2b for nRF52840 erase time fix 2018-02-16 16:01:33 +01:00
Damien George
d9b9fbc41a lib/utils/pyexec: Update to work with new MICROPY_HW_ENABLE_USB option. 2018-02-13 18:56:12 +11:00
Damien George
925c5b1da2 lib/utils/pyexec.h: Include py/obj.h because its decls are needed. 2018-01-31 18:21:07 +11:00