# HG changeset patch # User Ideenmodellierer # Date 1666119379 -7200 # Node ID 01f40cb1057ed40fd7e36fe1c8a80cd95fe6c06f # Parent 2c2b9c6eb08961ea059bf928c2d20ae0830bb819 Cleanup warnings: The code still contained several warnings which have now been resolved. Big thank you to Thomas :-) diff -r 2c2b9c6eb089 -r 01f40cb1057e Common/CPU1-F429.ld --- a/Common/CPU1-F429.ld Sun Sep 25 21:13:45 2022 +0200 +++ b/Common/CPU1-F429.ld Tue Oct 18 20:56:19 2022 +0200 @@ -48,8 +48,8 @@ /***************************** Memory Definition ****************************/ MEMORY { - ROM_BOOT (rx) : ORIGIN = 0x08000000, LENGTH = 0x00040000 /* 256K */ - ROM_MAIN (rx) : ORIGIN = 0x08040000, LENGTH = 0x00090000 /* 576K */ + ROM_BOOT (rx) : ORIGIN = 0x08000000, LENGTH = 0x00040000 /* 256K */ + ROM (rx) : ORIGIN = 0x08040000, LENGTH = 0x00090000 /* 576K */ UPPER(rx) : ORIGIN = 0x08132000, LENGTH = 0xAE270 /* 713K */ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 192K CCRAM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K diff -r 2c2b9c6eb089 -r 01f40cb1057e Discovery/Inc/tInfo.h --- a/Discovery/Inc/tInfo.h Sun Sep 25 21:13:45 2022 +0200 +++ b/Discovery/Inc/tInfo.h Tue Oct 18 20:56:19 2022 +0200 @@ -61,7 +61,7 @@ void tInfo_setEvent(uint32_t inputEventID, uint32_t inputFunctionCall); -void tInfo_set_on_off(uint32_t editID, uint32_t int1); +void tInfo_set_on_off(uint32_t editID, uint8_t int1); void exitInfo(void); #endif /* TINFO_H */ diff -r 2c2b9c6eb089 -r 01f40cb1057e Discovery/Src/externCPU2bootloader.c --- a/Discovery/Src/externCPU2bootloader.c Sun Sep 25 21:13:45 2022 +0200 +++ b/Discovery/Src/externCPU2bootloader.c Tue Oct 18 20:56:19 2022 +0200 @@ -49,7 +49,7 @@ static void Bootloader_send_command(uint8_t command); static void Bootloader_spi_single(uint8_t TxByte); static void Bootloader_spi(uint16_t lengthData, uint8_t *aTxBuffer, uint8_t *aRxBuffer); -static void Bootloader_Error_Handler(void); +//static void Bootloader_Error_Handler(void); /* Exported functions --------------------------------------------------------*/ @@ -286,7 +286,9 @@ } +/* static void Bootloader_Error_Handler(void) { while(1); } +*/ diff -r 2c2b9c6eb089 -r 01f40cb1057e Discovery/Src/gfx_engine.c --- a/Discovery/Src/gfx_engine.c Sun Sep 25 21:13:45 2022 +0200 +++ b/Discovery/Src/gfx_engine.c Tue Oct 18 20:56:19 2022 +0200 @@ -3053,7 +3053,7 @@ else pText = 0; } - if((*(char*)pText) & 0x80) + if(0 != pText && ((*(char*)pText) & 0x80)) { backup = pText; @@ -3159,6 +3159,7 @@ ptargetFont = (tFont *)cfg->font; } + decodeUTF8 = *(char*)pText; /* place ASCII char */ if((*(char*)pText == '\005') || (*(char*)pText == '\006')) { Xsum += 45; @@ -3920,15 +3921,15 @@ } if (!found && Font == &FontT54) { - Font = &FontT54Extra; + Font = (tFont *)&FontT54Extra; } else if (!found && (Font == &FontT84 || Font == &FontT84Spaced)) { - Font = &FontT84Extra; + Font = (tFont *)&FontT84Extra; } else if (!found && Font == &FontT105) { - Font = &FontT105Extra; + Font = (tFont *)&FontT105Extra; } return Font; @@ -3951,17 +3952,17 @@ if (Font == &FontT54) { found = 1; - Font = &FontT54Extra; + Font = (tFont *)&FontT54Extra; } else if (Font == &FontT84 || Font == &FontT84Spaced) { found = 1; - Font = &FontT84Extra; + Font = (tFont *)&FontT84Extra; } else if (Font == &FontT105) { found = 1; - Font = &FontT105Extra; + Font = (tFont *)&FontT105Extra; } if (found) diff -r 2c2b9c6eb089 -r 01f40cb1057e Discovery/Src/simulation.c --- a/Discovery/Src/simulation.c Sun Sep 25 21:13:45 2022 +0200 +++ b/Discovery/Src/simulation.c Tue Oct 18 20:56:19 2022 +0200 @@ -131,7 +131,7 @@ static _Bool two_second = 0; static float lastPressure_bar = 0; - float localCalibCoeff[3]; + float localCalibCoeff[3] = { 0.0, 0.0, 0.0 }; uint8_t index, index2; if(checkOncePerSecond) diff -r 2c2b9c6eb089 -r 01f40cb1057e Discovery/Src/tInfo.c --- a/Discovery/Src/tInfo.c Sun Sep 25 21:13:45 2022 +0200 +++ b/Discovery/Src/tInfo.c Tue Oct 18 20:56:19 2022 +0200 @@ -52,7 +52,7 @@ { char orgText[32]; char newText[32]; - char input; + uint8_t input; char symbolCounter; int8_t begin[4], size[4]; uint16_t coord[3]; @@ -466,7 +466,7 @@ } -void tInfo_set_on_off(uint32_t editID, uint32_t int1) +void tInfo_set_on_off(uint32_t editID, uint8_t int1) { uint8_t backup_id, temp_id; diff -r 2c2b9c6eb089 -r 01f40cb1057e Discovery/Src/tMenuEditGasOC.c --- a/Discovery/Src/tMenuEditGasOC.c Sun Sep 25 21:13:45 2022 +0200 +++ b/Discovery/Src/tMenuEditGasOC.c Tue Oct 18 20:56:19 2022 +0200 @@ -181,7 +181,7 @@ { uint8_t setpoint; - editGasPage.pGasLine = stateUsed->diveSettings.gas; + editGasPage.pGasLine = (SGasLine *)stateUsed->diveSettings.gas; if(ccr) { @@ -215,7 +215,7 @@ uint8_t oxygen, helium, gasOffset, textpointer, lineCount, ptrGas; //SDiveState * pState; - editGasPage.pGasLine = stateUsed->diveSettings.gas; + editGasPage.pGasLine = (SGasLine *)stateUsed->diveSettings.gas; if(ccr) { editGasPage.setpoint = stateUsed->lifeData.actualGas.setPoint_cbar; diff -r 2c2b9c6eb089 -r 01f40cb1057e Discovery/Src/tMenuEditPlanner.c --- a/Discovery/Src/tMenuEditPlanner.c Sun Sep 25 21:13:45 2022 +0200 +++ b/Discovery/Src/tMenuEditPlanner.c Tue Oct 18 20:56:19 2022 +0200 @@ -304,7 +304,7 @@ text[2] = 0; write_label_var( 20, 800, y_line, &FontT48, text); - strncpy(text, + strcpy(text, " " "\016\016" " l/min" @@ -316,8 +316,7 @@ " " "\016\016" " l/min" - "\017", - 40 + "\017" ); write_label_var( 400, 800, y_line, &FontT48, text); diff -r 2c2b9c6eb089 -r 01f40cb1057e FontPack/base_upperRegion.c --- a/FontPack/base_upperRegion.c Sun Sep 25 21:13:45 2022 +0200 +++ b/FontPack/base_upperRegion.c Tue Oct 18 20:56:19 2022 +0200 @@ -115,7 +115,9 @@ #define ASSERT_RANGE(e, min, max) ASSERT(min <= e); ASSERT( e <= max) +#if DEBUG_STLINK_V2 extern void initialise_monitor_handles(void); +#endif static int errors = 0; static uint8_t errorflag = 0; @@ -149,7 +151,7 @@ for(const tFont* font = & __font_directory; font < &__font_directory_end; ++font) { - printf("Font: %x\n",font); + printf("Font: %x\n",(unsigned int)font); // Check END-OF-DIRECTORY magic marker if( font->length == (uint32_t)-1 ) { @@ -183,7 +185,7 @@ ASSERT(image->height == font->height); if(errorflag) { - printf("image %x: h=%d fonth=%d\n",image,image->height,font->height); + printf("image %x: h=%d fonth=%d\n",(unsigned int)image,image->height,font->height); errorflag = 0; } // Uncompress image bytes diff -r 2c2b9c6eb089 -r 01f40cb1057e ostc4pack/src/OSTC4pack_V4.cpp --- a/ostc4pack/src/OSTC4pack_V4.cpp Sun Sep 25 21:13:45 2022 +0200 +++ b/ostc4pack/src/OSTC4pack_V4.cpp Tue Oct 18 20:56:19 2022 +0200 @@ -416,7 +416,7 @@ return(-1); } - FILE *fp, * fpout; + FILE *fp; size_t len; unsigned char buf[1050000]; char *file = argv[2]; @@ -424,7 +424,7 @@ unsigned int pruefsumme; //write File with length and cheksum - char filename[500], filenameout[510] ; + char filename[500], filenameout[511]; sprintf(filename,"%s",file); int filelength = strlen(filename); filename[filelength -4] = 0; @@ -435,7 +435,7 @@ return -1; } len = fread(buf, sizeof(char), sizeof(buf), fp); - printf("%d bytes read (hex: %#x )\n", len,len); + printf("%d bytes read (hex: %#x )\n", (uint32_t)len, (uint32_t)len); // unsigned int checksum = crc32c_checksum(buf, len); unsigned int checksum = CRC_CalcBlockCRC((uint32_t *)buf, (uint32_t)(len/4)); printf("The checksum of %s is %#x\n", file, checksum); @@ -455,7 +455,7 @@ buf2[1] = 0xFF & (len >> 16);; buf2[2] = 0xFF & (len >> 8); buf2[3] = 0xFF & len; - fpout = fopen(filenameout, "wb"); + fp = fopen(filenameout, "wb"); fwrite(buf2,sizeof(char),4,fp); @@ -505,7 +505,7 @@ for(int i = 0;i