From 7d8dac9211dab92d750a0351335b4ad3fffc05e2 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 8 Jan 2020 20:32:45 -0800 Subject: Refine iMX RT memory layout and add three boards Introduces a way to place CircuitPython code and data into tightly coupled memory (TCM) which is accessible by the CPU in a single cycle. It also frees up room in the corresponding cache for intermittent data. Loading from external flash is slow! The data cache is also now enabled. Adds support for the iMX RT 1021 chip. Adds three new boards: * iMX RT 1020 EVK * iMX RT 1060 EVK * Teensy 4.0 Related to #2492, #2472 and #2477. Fixes #2475. --- lib/tinyusb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tinyusb b/lib/tinyusb index dda4c9a94..1f95f439e 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit dda4c9a94b509238faa7b5ab5b9464c1d2e63ff0 +Subproject commit 1f95f439e11f519e69d75a4a8b7b9f28eaf5060e -- cgit v1.2.3 From aca53aa1a2c21ff46b609cfc270134ee6ee024f2 Mon Sep 17 00:00:00 2001 From: DavePutz Date: Tue, 18 Feb 2020 10:38:50 -0600 Subject: Update readline.c for REPL Unicode issue 1905 --- lib/mp-readline/readline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/mp-readline/readline.c b/lib/mp-readline/readline.c index 9d254d8cf..0edaebbfa 100644 --- a/lib/mp-readline/readline.c +++ b/lib/mp-readline/readline.c @@ -206,7 +206,7 @@ int readline_process_char(int c) { redraw_step_forward = compl_len; } #endif - } else if (32 <= c && c <= 126) { + } else if (32 <= c ) { // printable character vstr_ins_char(rl.line, rl.cursor_pos, c); // set redraw parameters -- cgit v1.2.3 From 41e71485af4f708c865e7878fe6f8f8aff61d175 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 4 Feb 2020 09:41:22 -0600 Subject: libm: Disable float-equal diagnostics I choose to believe these authors knew what they were doing. --- lib/libm/erf_lgamma.c | 1 + lib/libm/log1pf.c | 2 ++ 2 files changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/libm/erf_lgamma.c b/lib/libm/erf_lgamma.c index 877816a0c..fcb1d0a0c 100644 --- a/lib/libm/erf_lgamma.c +++ b/lib/libm/erf_lgamma.c @@ -24,6 +24,7 @@ */ #include "fdlibm.h" +#pragma GCC diagnostic ignored "-Wfloat-equal" #define __ieee754_logf logf diff --git a/lib/libm/log1pf.c b/lib/libm/log1pf.c index 0d32b0a2f..89ed250b0 100644 --- a/lib/libm/log1pf.c +++ b/lib/libm/log1pf.c @@ -18,6 +18,8 @@ #include "libm.h" +#pragma GCC diagnostic ignored "-Wfloat-equal" + static const float ln2_hi = 6.9313812256e-01, /* 0x3f317180 */ ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */ -- cgit v1.2.3 From 50438b51aa0af3f6453f334d3868f0a87eb94a89 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 4 Feb 2020 09:41:44 -0600 Subject: libm: Provide log2f --- lib/libm/math.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/libm/math.c b/lib/libm/math.c index 39c6a68a5..0e53563bc 100644 --- a/lib/libm/math.c +++ b/lib/libm/math.c @@ -50,6 +50,9 @@ float copysignf(float x, float y) { static const float _M_LN10 = 2.30258509299404; // 0x40135d8e float log10f(float x) { return logf(x) / (float)_M_LN10; } +#undef _M_LN2 +static const float _M_LN2 = 0.6931472; +float log2f(float x) { return logf(x) / (float)_M_LN2; } float tanhf(float x) { if (isinf(x)) { -- cgit v1.2.3 From eef742bf45f504cf23523fea4f20e61774407646 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 28 Feb 2020 10:04:06 -0600 Subject: oofatfs: Remove _FS_DISK_READ_ALIGNED This workaround is no longer needed, so it can be removed. Closes: #2332 --- lib/oofatfs/ff.c | 6 +----- lib/oofatfs/ffconf.h | 6 ------ ports/nrf/Makefile | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) (limited to 'lib') diff --git a/lib/oofatfs/ff.c b/lib/oofatfs/ff.c index 71bd19702..e961c789d 100644 --- a/lib/oofatfs/ff.c +++ b/lib/oofatfs/ff.c @@ -3382,11 +3382,7 @@ FRESULT f_read ( if (!sect) ABORT(fs, FR_INT_ERR); sect += csect; cc = btr / SS(fs); /* When remaining bytes >= sector size, */ - if (cc -#if _FS_DISK_READ_ALIGNED - && (((int)rbuff & 3) == 0) -#endif - ) {/* Read maximum contiguous sectors directly */ + if (cc) {/* Read maximum contiguous sectors directly */ if (csect + cc > fs->csize) { /* Clip at cluster boundary */ cc = fs->csize - csect; } diff --git a/lib/oofatfs/ffconf.h b/lib/oofatfs/ffconf.h index a3795fa3f..214311b4c 100644 --- a/lib/oofatfs/ffconf.h +++ b/lib/oofatfs/ffconf.h @@ -343,12 +343,6 @@ / SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be / included somewhere in the scope of ff.h. */ -// Set to nonzero if buffers passed to disk_read have a word alignment -// restriction -#ifndef _FS_DISK_READ_ALIGNED -#define _FS_DISK_READ_ALIGNED 0 -#endif - /* #include // O/S definitions */ diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 47a5b8653..89d88ce36 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -102,7 +102,6 @@ CFLAGS += -Wno-undef CFLAGS += -Wno-cast-align NRF_DEFINES += -DCONFIG_GPIO_AS_PINRESET -NRF_DEFINES += -D_FS_DISK_READ_ALIGNED=1 CFLAGS += $(NRF_DEFINES) CFLAGS += \ -- cgit v1.2.3