builtin problem in release version

This commit is contained in:
Edward Emelianov 2025-06-04 11:19:04 +03:00
parent a888b42eb6
commit cc8e915546
3 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@ if(DEBUG)
set(CMAKE_BUILD_TYPE DEBUG)
set(CMAKE_VERBOSE_MAKEFILE "ON")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -march=native -fdata-sections -ffunction-sections")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -march=native -fdata-sections -ffunction-sections -fno-builtin-strlen ")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
set(CMAKE_BUILD_TYPE RELEASE)
endif()

View File

@ -138,12 +138,12 @@ static int check_status(){
// run naked command or command with parameters
static int runcmd(const char *cmd, const char *par){
char buf[128];
char buf[256];
if(!cmd) return FALSE;
DBG("Send command %s with par %s", cmd, par);
if(!par) snprintf(buf, 127, "%s", cmd);
else snprintf(buf, 127, "%s%s", cmd, par);
if(!serial_write(buf, buf, 128)) return FALSE;
if(!par) snprintf(buf, 255, "%s", cmd);
else snprintf(buf, 255, "%s%s", cmd, par);
if(!serial_write(buf, buf, 255)) return FALSE;
if(strncmp(buf, "OK", 2)) return FALSE;
return TRUE;
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 16.0.2, 2025-06-04T10:34:29. -->
<!-- Written by QtCreator 16.0.2, 2025-06-04T11:18:43. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>