You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/06 15:03:19 UTC
[incubator-nuttx] branch master updated (faa2310 -> 8c748f2)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from faa2310 boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c: Fix syslog formats
new 7b39e61 include/nuttx/compiler.h: Add sysloglike macro
new ed1a258 include/syslog.h: Sprinkle sysloglike
new 8d16fe7 include/nuttx/compiler.h: Use __syslog__ if available
new 48c7fee include/debug.h: Apply sysloglike to _none
new 97b86d5 fs/spiffs/src/spiffs_core.c: Don't assume finfo() is a macro
new d11bcef arch/x86_64/src/common/up_assert.c: Avoid assuming how _alert is expanded
new c7a2ee1 libs/libc/machine/arm/armv6-m/arch_elf.c: Appease nxstyle
new f0fc385 libs/libc/machine/risc-v/rv64/arch_elf.c: Don't assume binfo expansion
new af4f81a wireless/bluetooth/bt_hcicore.c: Avoid assuming wlinfo expansion
new 14b7ea0 wireless/bluetooth/bt_conn.c: Avoid assuming wlinfo expansion
new 2a2679e wireless/bluetooth/bt_smp.c: Avoid assuming wlinfo expansion
new 065d310 arch/arm/src/stm32f0l0g0/stm32_adc.c: Don't assume debug macro expansion
new 44f88cd arch/arm/src/lpc17xx_40xx/lpc17_40_can.c: Don't assume debug macro expansion
new 330aa43 arch/arm/src/stm32/stm32_adc.c: Don't assume debug macro expansion
new c3791e7 arch/arm/src/armv7-m/arm_assert.c: Don't assume debug macro expansion
new b18c2e6 arch/arm/src/arm/arm_assert.c: Don't assume debug macro expansion
new 1e12c57 boards/arm/lpc214x/zp214xpa/src/lpc2148_spi1.c: Don't assume debug macro expansion
new 8c748f2 drivers/video/ov2640.c: Avoid assuming debug macro expansion
The 18 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
arch/arm/src/arm/arm_assert.c | 2 +-
arch/arm/src/armv7-m/arm_assert.c | 4 +-
arch/arm/src/lpc17xx_40xx/lpc17_40_can.c | 2 -
arch/arm/src/stm32/stm32_adc.c | 4 --
arch/arm/src/stm32f0l0g0/stm32_adc.c | 4 --
arch/x86_64/src/common/up_assert.c | 2 +-
boards/arm/lpc214x/zp214xpa/src/lpc2148_spi1.c | 8 +++
drivers/video/ov2640.c | 4 ++
fs/spiffs/src/spiffs_core.c | 2 -
include/debug.h | 4 +-
include/nuttx/compiler.h | 14 +++++
include/syslog.h | 5 +-
libs/libc/machine/arm/armv6-m/arch_elf.c | 72 +++++++++++++++++---------
libs/libc/machine/risc-v/rv64/arch_elf.c | 8 +--
wireless/bluetooth/bt_conn.c | 2 -
wireless/bluetooth/bt_hcicore.c | 2 -
wireless/bluetooth/bt_hcicore.h | 2 -
wireless/bluetooth/bt_smp.c | 4 --
18 files changed, 85 insertions(+), 60 deletions(-)
[incubator-nuttx] 06/18: arch/x86_64/src/common/up_assert.c: Avoid
assuming how _alert is expanded
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit d11bcef391a5d81a93e22f459bc13c4d3d5a0c24
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Nov 22 15:28:49 2020 +0900
arch/x86_64/src/common/up_assert.c: Avoid assuming how _alert is expanded
---
arch/x86_64/src/common/up_assert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86_64/src/common/up_assert.c b/arch/x86_64/src/common/up_assert.c
index 8e76edc..6cc87a1 100644
--- a/arch/x86_64/src/common/up_assert.c
+++ b/arch/x86_64/src/common/up_assert.c
@@ -250,7 +250,7 @@ void up_assert(const char *filename, int lineno)
board_autoled_on(LED_ASSERTION);
-#if CONFIG_TASK_NAME_SIZE > 0
+#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT)
_alert("Assertion failed at file:%s line: %d task: %s\n",
filename, lineno, rtcb->name);
#else
[incubator-nuttx] 05/18: fs/spiffs/src/spiffs_core.c: Don't assume
finfo() is a macro
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 97b86d58488115613b71f8275b586845e11999b5
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Nov 21 11:33:47 2020 +0900
fs/spiffs/src/spiffs_core.c: Don't assume finfo() is a macro
---
fs/spiffs/src/spiffs_core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/spiffs/src/spiffs_core.c b/fs/spiffs/src/spiffs_core.c
index 374eae0..c8ed78e 100644
--- a/fs/spiffs/src/spiffs_core.c
+++ b/fs/spiffs/src/spiffs_core.c
@@ -1523,12 +1523,10 @@ void spiffs_fobj_event(FAR struct spiffs_s *fs,
int ev, int16_t objid_raw, int16_t spndx,
int16_t new_pgndx, uint32_t new_size)
{
-#ifdef CONFIG_DEBUG_FS_INFO
FAR static const char *evname[] =
{
"UPD", "NEW", "DEL", "MOV", "HUP", "???"
};
-#endif
FAR struct spiffs_file_s *fobj;
FAR struct spiffs_file_s *next;
[incubator-nuttx] 16/18: arch/arm/src/arm/arm_assert.c: Don't
assume debug macro expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit b18c2e6cc5b0f146dd6578d6db81d6bba7f89edc
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 13:32:29 2020 +0900
arch/arm/src/arm/arm_assert.c: Don't assume debug macro expansion
---
arch/arm/src/arm/arm_assert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/src/arm/arm_assert.c b/arch/arm/src/arm/arm_assert.c
index 4957af5..0db0c41 100644
--- a/arch/arm/src/arm/arm_assert.c
+++ b/arch/arm/src/arm/arm_assert.c
@@ -332,7 +332,7 @@ void up_assert(const char *filename, int lineno)
syslog_flush();
-#if CONFIG_TASK_NAME_SIZE > 0
+#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT)
_alert("Assertion failed at file:%s line: %d task: %s\n",
filename, lineno, rtcb->name);
#else
[incubator-nuttx] 14/18: arch/arm/src/stm32/stm32_adc.c: Don't
assume debug macro expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 330aa43f72d4fcd61734c25db9d86c1b7d9853e1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 06:57:02 2020 +0900
arch/arm/src/stm32/stm32_adc.c: Don't assume debug macro expansion
---
arch/arm/src/stm32/stm32_adc.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c
index 7efe5f1..8e2006c 100644
--- a/arch/arm/src/stm32/stm32_adc.c
+++ b/arch/arm/src/stm32/stm32_adc.c
@@ -473,9 +473,7 @@ static void adc_modifyreg(FAR struct stm32_dev_s *priv, int offset,
static uint32_t adccmn_base_get(FAR struct stm32_dev_s *priv);
static void adccmn_modifyreg(FAR struct stm32_dev_s *priv, uint32_t offset,
uint32_t clrbits, uint32_t setbits);
-# ifdef CONFIG_DEBUG_ANALOG_INFO
static uint32_t adccmn_getreg(FAR struct stm32_dev_s *priv, uint32_t offset);
-# endif
#endif
#ifdef ADC_HAVE_TIMER
static uint16_t tim_getreg(FAR struct stm32_dev_s *priv, int offset);
@@ -1086,7 +1084,6 @@ static void adccmn_modifyreg(FAR struct stm32_dev_s *priv, uint32_t offset,
* Name: adccmn_getreg
****************************************************************************/
-# ifdef CONFIG_DEBUG_ANALOG_INFO
static uint32_t adccmn_getreg(FAR struct stm32_dev_s *priv, uint32_t offset)
{
uint32_t base = 0;
@@ -1099,7 +1096,6 @@ static uint32_t adccmn_getreg(FAR struct stm32_dev_s *priv, uint32_t offset)
return getreg32(base + offset);
}
-# endif
#endif /* HAVE_ADC_CMN_REGS */
/****************************************************************************
[incubator-nuttx] 01/18: include/nuttx/compiler.h: Add sysloglike
macro
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 7b39e612db568db7cf0e415e3ec6ccb34b381398
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 20 11:30:42 2020 +0900
include/nuttx/compiler.h: Add sysloglike macro
Right now, same as printflike.
Introduce a separate macro because syslog takes
a bit different format from printf. (ie. %m)
If it turns out that a compiler is not happy with
the difference, we can disable this selectively.
---
include/nuttx/compiler.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h
index 2ee6bcf..9b50bc14 100644
--- a/include/nuttx/compiler.h
+++ b/include/nuttx/compiler.h
@@ -144,6 +144,7 @@
# define noinline_function __attribute__ ((noinline))
# define printflike(a, b) __attribute__((__format__ (__printf__, a, b)))
+# define sysloglike(a, b) __attribute__((__format__ (__printf__, a, b)))
# define scanflike(a, b) __attribute__((__format__ (__scanf__, a, b)))
/* GCC does not use storage classes to qualify addressing */
@@ -362,6 +363,7 @@
# define noinline_function
# define printflike(a, b)
+# define sysloglike(a, b)
# define scanflike(a, b)
/* The reentrant attribute informs SDCC that the function
@@ -491,6 +493,7 @@
# define inline_function
# define noinline_function
# define printflike(a, b)
+# define sysloglike(a, b)
# define scanflike(a, b)
/* REVISIT: */
@@ -593,6 +596,7 @@
# define inline_function
# define noinline_function
# define printflike(a, b)
+# define sysloglike(a, b)
# define scanflike(a, b)
# define FAR
@@ -650,6 +654,7 @@
# define inline_function
# define noinline_function
# define printflike(a, b)
+# define sysloglike(a, b)
# define scanflike(a, b)
# define FAR
[incubator-nuttx] 17/18:
boards/arm/lpc214x/zp214xpa/src/lpc2148_spi1.c: Don't assume debug macro
expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 1e12c57bbad8a6dadbf34bb2cc1c50070936e341
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Nov 28 10:31:24 2020 +0900
boards/arm/lpc214x/zp214xpa/src/lpc2148_spi1.c: Don't assume debug macro expansion
---
boards/arm/lpc214x/zp214xpa/src/lpc2148_spi1.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/boards/arm/lpc214x/zp214xpa/src/lpc2148_spi1.c b/boards/arm/lpc214x/zp214xpa/src/lpc2148_spi1.c
index 078fe7b..dfc4450 100644
--- a/boards/arm/lpc214x/zp214xpa/src/lpc2148_spi1.c
+++ b/boards/arm/lpc214x/zp214xpa/src/lpc2148_spi1.c
@@ -237,16 +237,20 @@ static void spi_select(FAR struct spi_dev_s *dev, uint32_t devid,
/* Enable slave select (low enables) */
putreg32(bit, CS_CLR_REGISTER);
+#ifdef CONFIG_DEBUG_SPI_INFO
spiinfo("CS asserted: %08" PRIx32 "->%08" PRIx32 "\n",
regval, getreg32(CS_PIN_REGISTER));
+#endif
}
else
{
/* Disable slave select (low enables) */
putreg32(bit, CS_SET_REGISTER);
+#ifdef CONFIG_DEBUG_SPI_INFO
spiinfo("CS de-asserted: %08" PRIx32 "->%08" PRIx32 "\n", regval,
getreg32(CS_PIN_REGISTER));
+#endif
/* Wait for the TX FIFO not full indication */
@@ -382,16 +386,20 @@ static int spi_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd)
/* L: the inputs at D0 to D7 are transferred to the command registers */
putreg32(bit, CS_CLR_REGISTER);
+#ifdef CONFIG_DEBUG_SPI_INFO
spiinfo("Command: %08" PRIx32 "->%08" PRIx32 "\n",
regval, getreg32(CS_PIN_REGISTER));
+#endif
}
else
{
/* H: the inputs at D0 to D7 are treated as display data. */
putreg32(bit, CS_SET_REGISTER);
+#ifdef CONFIG_DEBUG_SPI_INFO
spiinfo("Data: %08" PRIx32 "->%08" PRIx32 "\n",
regval, getreg32(CS_PIN_REGISTER));
+#endif
}
return OK;
[incubator-nuttx] 12/18: arch/arm/src/stm32f0l0g0/stm32_adc.c:
Don't assume debug macro expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 065d310cf290c353819f2c263be3649fd59ab168
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 13:16:46 2020 +0900
arch/arm/src/stm32f0l0g0/stm32_adc.c: Don't assume debug macro expansion
---
arch/arm/src/stm32f0l0g0/stm32_adc.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/arm/src/stm32f0l0g0/stm32_adc.c b/arch/arm/src/stm32f0l0g0/stm32_adc.c
index 2ebc8dd..f1ecc21 100644
--- a/arch/arm/src/stm32f0l0g0/stm32_adc.c
+++ b/arch/arm/src/stm32f0l0g0/stm32_adc.c
@@ -262,9 +262,7 @@ static void adc_modifyreg(FAR struct stm32_dev_s *priv, int offset,
static uint32_t adccmn_base_get(FAR struct stm32_dev_s *priv);
static void adccmn_modifyreg(FAR struct stm32_dev_s *priv, uint32_t offset,
uint32_t clrbits, uint32_t setbits);
-# ifdef CONFIG_DEBUG_ANALOG_INFO
static uint32_t adccmn_getreg(FAR struct stm32_dev_s *priv, uint32_t offset);
-# endif
#endif
#ifdef ADC_HAVE_TIMER
static uint16_t tim_getreg(FAR struct stm32_dev_s *priv, int offset);
@@ -575,7 +573,6 @@ static void adccmn_modifyreg(FAR struct stm32_dev_s *priv, uint32_t offset,
* Name: adccmn_getreg
****************************************************************************/
-# ifdef CONFIG_DEBUG_ANALOG_INFO
static uint32_t adccmn_getreg(FAR struct stm32_dev_s *priv, uint32_t offset)
{
uint32_t base = 0;
@@ -588,7 +585,6 @@ static uint32_t adccmn_getreg(FAR struct stm32_dev_s *priv, uint32_t offset)
return getreg32(base + offset);
}
-# endif
#endif /* HAVE_ADC_CMN_REGS */
/****************************************************************************
[incubator-nuttx] 18/18: drivers/video/ov2640.c: Avoid assuming
debug macro expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 8c748f2d23a18939ce9056fa53a6bebcef8612f6
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 07:48:18 2020 +0900
drivers/video/ov2640.c: Avoid assuming debug macro expansion
---
drivers/video/ov2640.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/video/ov2640.c b/drivers/video/ov2640.c
index 52fc83f..bb3e4f2 100644
--- a/drivers/video/ov2640.c
+++ b/drivers/video/ov2640.c
@@ -860,12 +860,16 @@ static int ovr2640_chipid(FAR struct i2c_master_s *i2c)
if (pidl != OVR2640_PRODUCT_IDL || pidh != OVR2640_PRODUCT_IDH)
{
+#ifdef CONFIG_DEBUG_GRAPHICS
gerr("ERROR: Unsupported PID=%02x$02x MID=%02x%02x\n",
pidh, pidl, midh, midl);
+#endif
return -ENOSYS;
}
+#ifdef CONFIG_DEBUG_GRAPHICS
ginfo("PID=%02x$02x MID=%02x%02x\n", pidh, pidl, midh, midl);
+#endif
return OK;
}
[incubator-nuttx] 09/18: wireless/bluetooth/bt_hcicore.c: Avoid
assuming wlinfo expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit af4f81a7e14b52cd52c03e456e8c4c34eb2113e0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Nov 23 17:18:31 2020 +0900
wireless/bluetooth/bt_hcicore.c: Avoid assuming wlinfo expansion
---
wireless/bluetooth/bt_hcicore.c | 2 --
wireless/bluetooth/bt_hcicore.h | 2 --
2 files changed, 4 deletions(-)
diff --git a/wireless/bluetooth/bt_hcicore.c b/wireless/bluetooth/bt_hcicore.c
index feaa5bb..3d7bdfe 100644
--- a/wireless/bluetooth/bt_hcicore.c
+++ b/wireless/bluetooth/bt_hcicore.c
@@ -2144,7 +2144,6 @@ void bt_conn_cb_register(FAR struct bt_conn_cb_s *cb)
g_callback_list = cb;
}
-#ifdef CONFIG_DEBUG_WIRELESS_ERROR
FAR const char *bt_addr_str(FAR const bt_addr_t *addr)
{
static char bufs[2][18];
@@ -2170,7 +2169,6 @@ FAR const char *bt_addr_le_str(FAR const bt_addr_le_t *addr)
return str;
}
-#endif /* CONFIG_DEBUG_WIRELESS_ERROR */
#else
diff --git a/wireless/bluetooth/bt_hcicore.h b/wireless/bluetooth/bt_hcicore.h
index 343dfc2..4c2a6e5 100644
--- a/wireless/bluetooth/bt_hcicore.h
+++ b/wireless/bluetooth/bt_hcicore.h
@@ -327,10 +327,8 @@ int bt_hci_cmd_send_sync(uint16_t opcode, FAR struct bt_buf_s *buf,
* not multi-threading safe
*/
-#ifdef CONFIG_DEBUG_WIRELESS_ERROR
FAR const char *bt_addr_str(FAR const bt_addr_t *addr);
FAR const char *bt_addr_le_str(FAR const bt_addr_le_t *addr);
-#endif
/****************************************************************************
* Name: bt_start_advertising
[incubator-nuttx] 07/18: libs/libc/machine/arm/armv6-m/arch_elf.c:
Appease nxstyle
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit c7a2ee11ca409c4cd64c7d65ec3c24f5e6b3518e
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Nov 22 10:32:12 2020 +0900
libs/libc/machine/arm/armv6-m/arch_elf.c: Appease nxstyle
The following errors are intentionally left.
They are a part of tables which are not trivial to fix.
libs/libc/machine/arm/armv6-m/arch_elf.c:228:94: error: Long line found
libs/libc/machine/arm/armv6-m/arch_elf.c:230:89: error: Long line found
libs/libc/machine/arm/armv6-m/arch_elf.c:238:94: error: Long line found
libs/libc/machine/arm/armv6-m/arch_elf.c:240:89: error: Long line found
libs/libc/machine/arm/armv6-m/arch_elf.c:401:94: error: Long line found
libs/libc/machine/arm/armv6-m/arch_elf.c:403:91: error: Long line found
libs/libc/machine/arm/armv6-m/arch_elf.c:411:94: error: Long line found
libs/libc/machine/arm/armv6-m/arch_elf.c:413:91: error: Long line found
---
libs/libc/machine/arm/armv6-m/arch_elf.c | 72 +++++++++++++++++++++-----------
1 file changed, 48 insertions(+), 24 deletions(-)
diff --git a/libs/libc/machine/arm/armv6-m/arch_elf.c b/libs/libc/machine/arm/armv6-m/arch_elf.c
index 900aaca..5425695 100644
--- a/libs/libc/machine/arm/armv6-m/arch_elf.c
+++ b/libs/libc/machine/arm/armv6-m/arch_elf.c
@@ -92,7 +92,8 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
if (ehdr->e_ident[EI_CLASS] != ELFCLASS32)
{
- berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
+ berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n",
+ ehdr->e_ident[EI_CLASS]);
return false;
}
@@ -104,11 +105,13 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
#endif
{
- berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
+ berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n",
+ ehdr->e_ident[EI_DATA]);
return false;
}
/* TODO: Check ABI here. */
+
return true;
}
@@ -166,8 +169,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_CALL:
case R_ARM_JUMP24:
{
- binfo("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%p' st_value=%08lx\n",
- ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr),
+ binfo("Performing PC24 [%d] link at "
+ "addr %08lx [%08lx] to sym '%p' st_value=%08lx\n",
+ ELF32_R_TYPE(rel->r_info), (long)addr,
+ (long)(*(uint32_t *)addr),
sym, (long)sym->st_value);
offset = (*(uint32_t *)addr & 0x00ffffff) << 2;
@@ -177,9 +182,11 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
}
offset += sym->st_value - addr;
- if (offset & 3 || offset < (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000)
+ if (offset & 3 || offset < (int32_t) 0xfe000000 ||
+ offset >= (int32_t) 0x02000000)
{
- berr("ERROR: ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
+ berr("ERROR: ERROR: PC24 [%d] relocation out of range, "
+ "offset=%08lx\n",
ELF32_R_TYPE(rel->r_info), offset);
return -EINVAL;
@@ -195,8 +202,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_ABS32:
case R_ARM_TARGET1: /* New ABI: TARGET1 always treated as ABS32 */
{
- binfo("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
- (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value);
+ binfo("Performing ABS32 link at addr=%08lx [%08lx] "
+ "to sym=%p st_value=%08lx\n",
+ (long)addr, (long)(*(uint32_t *)addr), sym,
+ (long)sym->st_value);
*(uint32_t *)addr += sym->st_value;
}
@@ -243,8 +252,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
upper_insn = (uint32_t)(*(uint16_t *)addr);
lower_insn = (uint32_t)(*(uint16_t *)(addr + 2));
- binfo("Performing THM_JUMP24 [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n",
- ELF32_R_TYPE(rel->r_info), (long)addr, (int)upper_insn, (int)lower_insn,
+ binfo("Performing THM_JUMP24 [%d] link "
+ "at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n",
+ ELF32_R_TYPE(rel->r_info), (long)addr,
+ (int)upper_insn, (int)lower_insn,
sym, (long)sym->st_value);
/* Extract the 25-bit offset from the 32-bit instruction:
@@ -288,7 +299,8 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
if (ELF32_ST_TYPE(sym->st_info) == STT_FUNC && (offset & 1) == 0)
{
- berr("ERROR: ERROR: JUMP24 [%d] requires odd offset, offset=%08lx\n",
+ berr("ERROR: ERROR: JUMP24 [%d] "
+ "requires odd offset, offset=%08lx\n",
ELF32_R_TYPE(rel->r_info), offset);
return -EINVAL;
@@ -298,7 +310,8 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
if (offset < (int32_t)0xff000000 || offset >= (int32_t)0x01000000)
{
- berr("ERROR: ERROR: JUMP24 [%d] relocation out of range, branch target=%08lx\n",
+ berr("ERROR: ERROR: JUMP24 [%d] "
+ "relocation out of range, branch target=%08lx\n",
ELF32_R_TYPE(rel->r_info), offset);
return -EINVAL;
@@ -312,10 +325,12 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
J1 = S ^ (~(offset >> 23) & 1);
J2 = S ^ (~(offset >> 22) & 1);
- upper_insn = ((upper_insn & 0xf800) | (S << 10) | ((offset >> 12) & 0x03ff));
+ upper_insn = ((upper_insn & 0xf800) | (S << 10) |
+ ((offset >> 12) & 0x03ff));
*(uint16_t *)addr = (uint16_t)upper_insn;
- lower_insn = ((lower_insn & 0xd000) | (J1 << 13) | (J2 << 11) | ((offset >> 1) & 0x07ff));
+ lower_insn = ((lower_insn & 0xd000) | (J1 << 13) | (J2 << 11) |
+ ((offset >> 1) & 0x07ff));
*(uint16_t *)(addr + 2) = (uint16_t)lower_insn;
binfo(" S=%d J1=%d J2=%d insn [%04x %04x]\n",
@@ -340,8 +355,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_PREL31:
{
- binfo("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
- (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value);
+ binfo("Performing PREL31 link "
+ "at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
+ (long)addr, (long)(*(uint32_t *)addr),
+ sym, (long)sym->st_value);
offset = *(uint32_t *)addr + sym->st_value - addr;
*(uint32_t *)addr = offset & 0x7fffffff;
@@ -351,8 +368,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_MOVW_ABS_NC:
case R_ARM_MOVT_ABS:
{
- binfo("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
- ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr),
+ binfo("Performing MOVx_ABS [%d] link "
+ "at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
+ ELF32_R_TYPE(rel->r_info),
+ (long)addr, (long)(*(uint32_t *)addr),
sym, (long)sym->st_value);
offset = *(uint32_t *)addr;
@@ -405,8 +424,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
upper_insn = (uint32_t)(*(uint16_t *)addr);
lower_insn = (uint32_t)(*(uint16_t *)(addr + 2));
- binfo("Performing THM_MOVx [%d] link at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n",
- ELF32_R_TYPE(rel->r_info), (long)addr, (int)upper_insn, (int)lower_insn,
+ binfo("Performing THM_MOVx [%d] link "
+ "at addr=%08lx [%04x %04x] to sym=%p st_value=%08lx\n",
+ ELF32_R_TYPE(rel->r_info), (long)addr,
+ (int)upper_insn, (int)lower_insn,
sym, (long)sym->st_value);
/* Extract the 16-bit offset from the 32-bit instruction */
@@ -423,8 +444,9 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
offset += sym->st_value;
- /* Update the immediate value in the instruction. For MOVW we want the bottom
- * 16-bits; for MOVT we want the top 16-bits.
+ /* Update the immediate value in the instruction.
+ * For MOVW we want the bottom 16-bits; for MOVT we want
+ * the top 16-bits.
*/
if (ELF32_R_TYPE(rel->r_info) == R_ARM_THM_MOVT_ABS)
@@ -432,10 +454,12 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
offset >>= 16;
}
- upper_insn = ((upper_insn & 0xfbf0) | ((offset & 0xf000) >> 12) | ((offset & 0x0800) >> 1));
+ upper_insn = ((upper_insn & 0xfbf0) | ((offset & 0xf000) >> 12) |
+ ((offset & 0x0800) >> 1));
*(uint16_t *)addr = (uint16_t)upper_insn;
- lower_insn = ((lower_insn & 0x8f00) | ((offset & 0x0700) << 4) | (offset & 0x00ff));
+ lower_insn = ((lower_insn & 0x8f00) | ((offset & 0x0700) << 4) |
+ (offset & 0x00ff));
*(uint16_t *)(addr + 2) = (uint16_t)lower_insn;
binfo(" insn [%04x %04x]\n",
[incubator-nuttx] 08/18: libs/libc/machine/risc-v/rv64/arch_elf.c:
Don't assume binfo expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit f0fc385232359d099b15681bece380c5922da533
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Nov 22 17:21:26 2020 +0900
libs/libc/machine/risc-v/rv64/arch_elf.c: Don't assume binfo expansion
---
libs/libc/machine/risc-v/rv64/arch_elf.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/libs/libc/machine/risc-v/rv64/arch_elf.c b/libs/libc/machine/risc-v/rv64/arch_elf.c
index acc0243..85a78a0e 100644
--- a/libs/libc/machine/risc-v/rv64/arch_elf.c
+++ b/libs/libc/machine/risc-v/rv64/arch_elf.c
@@ -43,19 +43,16 @@
* Private Data Types
****************************************************************************/
-#ifdef CONFIG_DEBUG_BINFMT_INFO
struct rname_code_s
{
const char *name;
int type;
};
-#endif
/****************************************************************************
* Private Data
****************************************************************************/
-#ifdef CONFIG_DEBUG_BINFMT_INFO
static struct rname_code_s _rname_table[] =
{
{"RELAX", R_RISCV_RELAX},
@@ -68,14 +65,12 @@ static struct rname_code_s _rname_table[] =
{"RVC_JUMP", R_RISCV_RVC_JUMP},
{"RVC_BRANCH", R_RISCV_RVC_BRANCH},
};
-#endif
/****************************************************************************
* Private Functions
****************************************************************************/
-#ifdef CONFIG_DEBUG_BINFMT_INFO
-const char *_get_rname(int type)
+static const char *_get_rname(int type)
{
int i = 0;
@@ -91,7 +86,6 @@ const char *_get_rname(int type)
return "?????";
}
-#endif
/****************************************************************************
* Name: _get_val, set_val, _add_val
[incubator-nuttx] 13/18: arch/arm/src/lpc17xx_40xx/lpc17_40_can.c:
Don't assume debug macro expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 44f88cd71a56dd8429dd9d90631eaab2eb787fa7
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:30:55 2020 +0900
arch/arm/src/lpc17xx_40xx/lpc17_40_can.c: Don't assume debug macro expansion
---
arch/arm/src/lpc17xx_40xx/lpc17_40_can.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
index 7d11140..124a6cb 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
@@ -552,9 +552,7 @@ static void lpc17can_reset(FAR struct can_dev_s *dev)
static int lpc17can_setup(FAR struct can_dev_s *dev)
{
-#ifdef CONFIG_DEBUG_CAN_INFO
FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->cd_priv;
-#endif
int ret;
caninfo("CAN%d\n", priv->port);
[incubator-nuttx] 04/18: include/debug.h: Apply sysloglike to _none
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 48c7fee534ff6568f0e1dbbecc14aa658b9eba7a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 20 16:48:40 2020 +0900
include/debug.h: Apply sysloglike to _none
---
include/debug.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/debug.h b/include/debug.h
index dcebe4c..e3c16db 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -105,7 +105,9 @@
*/
#ifdef CONFIG_CPP_HAVE_VARARGS
-# define _none(x...)
+/* don't call syslog while performing the compiler's format check. */
+# define _none(format, ...) \
+ do { if (0) syslog(LOG_ERR, format, ##__VA_ARGS__); } while (0)
#else
# define _none (void)
#endif
[incubator-nuttx] 03/18: include/nuttx/compiler.h: Use __syslog__
if available
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 8d16fe7cfdc0ddc3497a3e8ce7e92e59fe02f2f5
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Nov 21 08:38:47 2020 +0900
include/nuttx/compiler.h: Use __syslog__ if available
---
include/nuttx/compiler.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h
index 9b50bc14..f6779a7 100644
--- a/include/nuttx/compiler.h
+++ b/include/nuttx/compiler.h
@@ -143,8 +143,17 @@
# define inline_function __attribute__ ((always_inline,no_instrument_function))
# define noinline_function __attribute__ ((noinline))
+/* Some versions of GCC have a separate __syslog__ format.
+ * http://mail-index.netbsd.org/source-changes/2015/10/14/msg069435.html
+ * Use it if available. Otherwise, assume __printf__ accepts %m.
+ */
+
+# if !defined(__syslog_attribute__)
+# define __syslog__ __printf__
+# endif
+
# define printflike(a, b) __attribute__((__format__ (__printf__, a, b)))
-# define sysloglike(a, b) __attribute__((__format__ (__printf__, a, b)))
+# define sysloglike(a, b) __attribute__((__format__ (__syslog__, a, b)))
# define scanflike(a, b) __attribute__((__format__ (__scanf__, a, b)))
/* GCC does not use storage classes to qualify addressing */
[incubator-nuttx] 15/18: arch/arm/src/armv7-m/arm_assert.c: Don't
assume debug macro expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit c3791e7c23b962a780e9b859f65819081bb34015
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 19:34:50 2020 +0900
arch/arm/src/armv7-m/arm_assert.c: Don't assume debug macro expansion
---
arch/arm/src/armv7-m/arm_assert.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/armv7-m/arm_assert.c b/arch/arm/src/armv7-m/arm_assert.c
index c1a29cd..ee6c0d1 100644
--- a/arch/arm/src/armv7-m/arm_assert.c
+++ b/arch/arm/src/armv7-m/arm_assert.c
@@ -398,7 +398,7 @@ void up_assert(const char *filename, int lineno)
syslog_flush();
#ifdef CONFIG_SMP
-#if CONFIG_TASK_NAME_SIZE > 0
+#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT)
_alert("Assertion failed CPU%d at file:%s line: %d task: %s\n",
up_cpu_index(), filename, lineno, rtcb->name);
#else
@@ -406,7 +406,7 @@ void up_assert(const char *filename, int lineno)
up_cpu_index(), filename, lineno);
#endif
#else
-#if CONFIG_TASK_NAME_SIZE > 0
+#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG_ALERT)
_alert("Assertion failed at file:%s line: %d task: %s\n",
filename, lineno, rtcb->name);
#else
[incubator-nuttx] 02/18: include/syslog.h: Sprinkle sysloglike
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ed1a2584f017c61e2f61fcbb02a5f53e64dd6c80
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 20 11:34:10 2020 +0900
include/syslog.h: Sprinkle sysloglike
---
include/syslog.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/syslog.h b/include/syslog.h
index 4c6b57f..9c6d879 100644
--- a/include/syslog.h
+++ b/include/syslog.h
@@ -198,8 +198,9 @@ void closelog(void);
*
****************************************************************************/
-void syslog(int priority, FAR const IPTR char *fmt, ...);
-void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap);
+void syslog(int priority, FAR const IPTR char *fmt, ...) sysloglike(2, 3);
+void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
+ sysloglike(2, 0);
/****************************************************************************
* Name: setlogmask
[incubator-nuttx] 10/18: wireless/bluetooth/bt_conn.c: Avoid
assuming wlinfo expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 14b7ea01ba83dfcd1d84b5931f1af9b9b020922b
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Nov 23 17:26:25 2020 +0900
wireless/bluetooth/bt_conn.c: Avoid assuming wlinfo expansion
---
wireless/bluetooth/bt_conn.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/wireless/bluetooth/bt_conn.c b/wireless/bluetooth/bt_conn.c
index 0c13f8b..cfa934a 100644
--- a/wireless/bluetooth/bt_conn.c
+++ b/wireless/bluetooth/bt_conn.c
@@ -92,7 +92,6 @@ static struct bt_conn_handoff_s g_conn_handoff =
* Private Functions
****************************************************************************/
-#ifdef CONFIG_DEBUG_WIRELESS_INFO
static const char *state2str(enum bt_conn_state_e state)
{
switch (state)
@@ -116,7 +115,6 @@ static const char *state2str(enum bt_conn_state_e state)
return "(unknown)";
}
}
-#endif
static void bt_conn_reset_rx_state(FAR struct bt_conn_s *conn)
{
[incubator-nuttx] 11/18: wireless/bluetooth/bt_smp.c: Avoid
assuming wlinfo expansion
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 2a2679e11a21ae6a6d6ca84494ca63ec2b9bcb55
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Mon Nov 23 17:34:24 2020 +0900
wireless/bluetooth/bt_smp.c: Avoid assuming wlinfo expansion
---
wireless/bluetooth/bt_smp.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/wireless/bluetooth/bt_smp.c b/wireless/bluetooth/bt_smp.c
index 1c43806..29a8a07 100644
--- a/wireless/bluetooth/bt_smp.c
+++ b/wireless/bluetooth/bt_smp.c
@@ -138,9 +138,7 @@ struct bt_smphandlers_s
* Private Function Prototypes
****************************************************************************/
- #ifdef CONFIG_DEBUG_WIRELESS_INFO
static const char *h(FAR const void *buf, size_t len);
-#endif
static void xor_128(FAR const struct uint128_s *p,
FAR const struct uint128_s *q, FAR struct uint128_s *r);
static int le_encrypt(const uint8_t key[16], const uint8_t plaintext[16],
@@ -323,7 +321,6 @@ static const uint8_t g_mac4[] =
* in a single syslog call.
*/
-#ifdef CONFIG_DEBUG_WIRELESS_INFO
static const char *h(FAR const void *buf, size_t len)
{
static const char hex[] = "0123456789abcdef";
@@ -352,7 +349,6 @@ static const char *h(FAR const void *buf, size_t len)
str[i * 2] = '\0';
return str;
}
-#endif
static void xor_128(FAR const struct uint128_s *p,
FAR const struct uint128_s *q,