Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions drivers/serial/uart_bth4.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
}
else
{
syslog(LOG_ERR,
"uart_bth4 rx dropped: circbuf full (type=%u len=%zu space=%u)\n",

Check failure on line 172 in drivers/serial/uart_bth4.c

View workflow job for this annotation

GitHub Actions / checkpatch / checkpatch

Long line found
(unsigned int)type, buflen, circbuf_space(&dev->circbuf));
ret = -ENOMEM;
}

Expand Down
16 changes: 15 additions & 1 deletion include/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@
* Public Type Definitions
****************************************************************************/

/* Structure type returned by the div() function. */
/* Structure type returned by the div() function.
* NOTE: In C++ the toolchain C library (newlib) already provides div_t etc.,
* and libstdc++'s <cstdlib> does include_next to the C stdlib, so defining
* them here would conflict. Skip them in C++ mode (TFLM/GCC13 build fix).
*/

#if !defined(__cplusplus)

struct div_s
{
Expand Down Expand Up @@ -117,6 +123,8 @@ struct lldiv_s

typedef struct lldiv_s lldiv_t;

#endif /* !defined(__cplusplus) */

/****************************************************************************
* Public Function Prototypes
****************************************************************************/
Expand Down Expand Up @@ -160,7 +168,11 @@ uint32_t arc4random(void);
FAR char **get_environ_ptr(void);

FAR char *getenv(FAR const char *);

/* putenv is provided by the toolchain C library in C++ mode */
#if !defined(__cplusplus)
int putenv(FAR const char *);
#endif

int clearenv(void);

Expand Down Expand Up @@ -266,11 +278,13 @@ long int labs(long int);
long long int llabs(long long int);
#endif

#if !defined(__cplusplus)
div_t div(int, int);
ldiv_t ldiv(long, long);
#ifdef CONFIG_HAVE_LONG_LONG
lldiv_t lldiv(long long, long long);
#endif
#endif /* !defined(__cplusplus) */

/* Temporary files */

Expand Down
9 changes: 8 additions & 1 deletion tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ function build_board_cmake()
GHS_OPTS_STRING="CONFIG_ARM_TOOLCHAIN_GHS=y"
TASKING_OPTS_STRING="CONFIG_TRICORE_TOOLCHAIN_TASKING=y"
defconfig_path=$1/defconfig
valid_defconfig_path=$(echo ${defconfig_path} | sed 's/^.\{3\}//')
if [[ ${defconfig_path} =~ ^/ ]]; then
valid_defconfig_path=$(echo ${defconfig_path} | sed 's/^.\{3\}//')
else
valid_defconfig_path=${defconfig_path}
fi
if grep -qE "^(${GHS_OPTS_STRING}|${TASKING_OPTS_STRING})$" "${valid_defconfig_path}"; then
echo "EXTRA_FLAGS are required to update the when using the GHS toolchain."
EXTRA_FLAGS=$(echo "$EXTRA_FLAGS" | sed 's/-Wno-cpp//' | xargs)
Expand All @@ -140,6 +144,9 @@ function build_board_cmake()
for arg in "${@:2}"
do
if [[ $arg == *config ]]; then
if [ ! -d "${CMAKE_BINARY_DIR}" ]; then
_do_cmake_generator
fi
if ! m $arg; then
echo "Error: ############# m $arg fail ##############"
exit 2
Expand Down
Loading