how to config Platformio on vs code for stm32 old code - Page 1
Forum section: electronics / general

author: kimera
author_rank: Contributor
timestamp: March 12, 2025, 04:56:11 pm
content: I can't verify the code STM32F401ccu6 (blackpill) from platformio Because there is an error in the library file, but this problem does not occur when running with arduino ide 1.8.19. But because the code is many lines, I want to work with vscode. How can I solve this problem so that I can verify the code?error :Code:lib\N5110_GUI_encoder_demo_STM32_cleaned/c64enh_font.h:6:1: error: narrowing conversion of '-7' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing]6 | -7, 8, 32, '~'+1+18, // -width, height, firstChar, lastChar| ^~source file errorCode:#ifndef c64enh_font_h#define c64enh_font_hconst uint8_t c64enh[] PROGMEM ={-7, 8, 32, '~'+1+18, // -width, height, firstChar, lastChar0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //0x02, 0x5F, 0x5F, 0x00, 0x00, 0x00, 0x00, 0x00, // !0x06, 0x07, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, // "0x07, 0x14, 0x7F, 0x7F, 0x14, 0x7F, 0x7F, 0x14, // #0x06, 0x24, 0x2E, 0x6B, 0x6B, 0x3A, 0x12, 0x00, // $0x06, 0x63, 0x73, 0x18, 0x0C, 0x67, 0x63, 0x00, // %0x07, 0x32, 0x7F, 0x4D, 0x4D, 0x77, 0x72, 0x50, // &0x04, 0x06, 0x09, 0x09, 0x06, 0x00, 0x00, 0x00, // '0x04, 0x1C, 0x3E, 0x63, 0x41, 0x00, 0x00, 0x00, // (0x04, 0x41, 0x63, 0x3E, 0x1C, 0x00, 0x00, 0x00, // )0x07, 0x08, 0x2A, 0x3E, 0x1C, 0x3E, 0x2A, 0x08, // *0x06, 0x08, 0x08, 0x3E, 0x3E, 0x08, 0x08, 0x00, // +0x03, 0x80, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x00, // ,0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, // -0x02, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, // .0x07, 0x40, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x02, // /0x06, 0x3E, 0x7F, 0x49, 0x45, 0x7F, 0x3E, 0x00, // 00x06, 0x40, 0x44, 0x7F, 0x7F, 0x40, 0x40, 0x00, // 10x06, 0x62, 0x73, 0x59, 0x49, 0x4F, 0x46, 0x00, // 20x06, 0x22, 0x63, 0x49, 0x49, 0x7F, 0x36, 0x00, // 30x07, 0x18, 0x1C, 0x16, 0x13, 0x7F, 0x7F, 0x10, // 40x06, 0x27, 0x67, 0x45, 0x45, 0x7D, 0x39, 0x00, // 50x06, 0x3E, 0x7F, 0x49, 0x49, 0x7B, 0x32, 0x00, // 60x06, 0x01, 0x01, 0x79, 0x7D, 0x07, 0x03, 0x00, // 70x06, 0x36, 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00, // 80x06, 0x26, 0x6F, 0x49, 0x49, 0x7F, 0x3E, 0x00, // 90x02, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, // :0x03, 0x80, 0xC4, 0x44, 0x00, 0x00, 0x00, 0x00, // ;0x06, 0x08, 0x1C, 0x36, 0x63, 0x41, 0x41, 0x00, // <0x06, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, // =0x06, 0x41, 0x41, 0x63, 0x36, 0x1C, 0x08, 0x00, // >0x06, 0x02, 0x03, 0x51, 0x59, 0x0F, 0x06, 0x00, // ?0x06, 0x3E, 0x7F, 0x41, 0x4D, 0x6F, 0x2E, 0x00, // @0x06, 0x7C, 0x7E, 0x13, 0x13, 0x7E, 0x7C, 0x00, // A0x06, 0x7F, 0x7F, 0x49, 0x49, 0x7F, 0x36, 0x00, // B0x06, 0x3E, 0x7F, 0x41, 0x41, 0x63, 0x22, 0x00, // C0x06, 0x7F, 0x7F, 0x41, 0x41, 0x7F, 0x3E, 0x00, // D0x06, 0x7F, 0x7F, 0x49, 0x49, 0x41, 0x41, 0x00, // E0x06, 0x7F, 0x7F, 0x09, 0x09, 0x01, 0x01, 0x00, // F0x06, 0x3E, 0x7F, 0x41, 0x49, 0x7B, 0x3A, 0x00, // G0x06, 0x7F, 0x7F, 0x08, 0x08, 0x7F, 0x7F, 0x00, // H0x04, 0x41, 0x7F, 0x7F, 0x41, 0x00, 0x00, 0x00, // I0x06, 0x20, 0x60, 0x41, 0x7F, 0x3F, 0x01, 0x00, // J0x06, 0x7F, 0x7F, 0x1C, 0x36, 0x63, 0x41, 0x00, // K0x06, 0x7F, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, // L0x07, 0x7F, 0x7F, 0x06, 0x0C, 0x06, 0x7F, 0x7F, // M0x06, 0x7F, 0x7F, 0x0C, 0x18, 0x7F, 0x7F, 0x00, // N0x06, 0x3E, 0x7F, 0x41, 0x41, 0x7F, 0x3E, 0x00, // O0x06, 0x7F, 0x7F, 0x09, 0x09, 0x0F, 0x06, 0x00, // P0x06, 0x1E, 0x3F, 0x21, 0x61, 0x7F, 0x5E, 0x00, // Q0x06, 0x7F, 0x7F, 0x19, 0x39, 0x6F, 0x46, 0x00, // R0x06, 0x26, 0x6F, 0x49, 0x49, 0x7B, 0x32, 0x00, // S0x06, 0x01, 0x01, 0x7F, 0x7F, 0x01, 0x01, 0x00, // T0x06, 0x3F, 0x7F, 0x40, 0x40, 0x7F, 0x3F, 0x00, // U0x06, 0x1F, 0x3F, 0x60, 0x60, 0x3F, 0x1F, 0x00, // V0x07, 0x7F, 0x7F, 0x30, 0x18, 0x30, 0x7F, 0x7F, // W0x06, 0x41, 0x63, 0x3E, 0x3E, 0x63, 0x41, 0x00, // X0x06, 0x07, 0x0F, 0x78, 0x78, 0x0F, 0x07, 0x00, // Y0x06, 0x61, 0x71, 0x59, 0x4D, 0x47, 0x43, 0x00, // Z0x04, 0x7F, 0x7F, 0x41, 0x41, 0x00, 0x00, 0x00, // [0x07, 0x02, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40, // BackSlash0x04, 0x41, 0x41, 0x7F, 0x7F, 0x00, 0x00, 0x00, // ]0x06, 0x08, 0x0C, 0xFE, 0xFE, 0x0C, 0x08, 0x00, // ^0x07, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, // _0x07, 0x1C, 0x3E, 0x63, 0x41, 0x63, 0x14, 0x14, // `0x06, 0x20, 0x74, 0x54, 0x54, 0x7C, 0x78, 0x00, // a0x06, 0x7F, 0x7F, 0x44, 0x44, 0x7C, 0x38, 0x00, // b0x05, 0x38, 0x7C, 0x44, 0x44, 0x44, 0x00, 0x00, // c0x06, 0x38, 0x7C, 0x44, 0x44, 0x7F, 0x7F, 0x00, // d0x06, 0x38, 0x7C, 0x54, 0x54, 0x5C, 0x18, 0x00, // e0x05, 0x08, 0x7E, 0x7F, 0x09, 0x09, 0x00, 0x00, // f0x06, 0x98, 0xBC, 0xA4, 0xA4, 0xFC, 0x7C, 0x00, // g0x06, 0x7F, 0x7F, 0x04, 0x04, 0x7C, 0x78, 0x00, // h0x04, 0x44, 0x7D, 0x7D, 0x40, 0x00, 0x00, 0x00, // i0x05, 0x80, 0x80, 0x80, 0xFD, 0x7D, 0x00, 0x00, // j0x06, 0x7F, 0x7F, 0x10, 0x38, 0x6C, 0x44, 0x00, // k0x04, 0x41, 0x7F, 0x7F, 0x40, 0x00, 0x00, 0x00, // l0x07, 0x78, 0x7C, 0x0C, 0x38, 0x0C, 0x7C, 0x78, // m0x06, 0x7C, 0x7C, 0x04, 0x04, 0x7C, 0x78, 0x00, // n0x06, 0x38, 0x7C, 0x44, 0x44, 0x7C, 0x38, 0x00, // o0x06, 0xFC, 0xFC, 0x24, 0x24, 0x3C, 0x18, 0x00, // p0x06, 0x18, 0x3C, 0x24, 0x24, 0xFC, 0xFC, 0x00, // q0x06, 0x7C, 0x7C, 0x04, 0x04, 0x0C, 0x08, 0x00, // r0x06, 0x48, 0x5C, 0x54, 0x54, 0x74, 0x24, 0x00, // s0x05, 0x04, 0x3F, 0x7F, 0x44, 0x44, 0x00, 0x00, // t0x06, 0x3C, 0x7C, 0x40, 0x40, 0x7C, 0x7C, 0x00, // u0x06, 0x1C, 0x3C, 0x60, 0x60, 0x3C, 0x1C, 0x00, // v0x07, 0x1C, 0x7C, 0x60, 0x38, 0x60, 0x7C, 0x1C, // w0x06, 0x44, 0x6C, 0x38, 0x38, 0x6C, 0x44, 0x00, // x0x06, 0x9C, 0xBC, 0xA0, 0xE0, 0x7C, 0x3C, 0x00, // y0x06, 0x44, 0x64, 0x74, 0x5C, 0x4C, 0x44, 0x00, // z0x05, 0x08, 0x3E, 0x7F, 0x41, 0x41, 0x00, 0x00, // {0x02, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, // |0x05, 0x41, 0x41, 0x7F, 0x3E, 0x08, 0x00, 0x00, // }0x05, 0x10, 0x18, 0x18, 0x18, 0x08, 0x00, 0x00, // ~0x02, 0x7E, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x07, 0x7C, 0x7E, 0x13, 0x13, 0x7E, 0xFC, 0x80, // Ą0x06, 0x3C, 0x7E, 0x46, 0x43, 0x66, 0x24, 0x00, // !0x07, 0x7F, 0x7F, 0x49, 0x49, 0x41, 0xC1, 0x80, // "0x06, 0x7F, 0x7F, 0x48, 0x44, 0x40, 0x40, 0x00, // #0x06, 0x7E, 0x7E, 0x0C, 0x19, 0x7E, 0x7E, 0x00, // $0x06, 0x3C, 0x7E, 0x46, 0x43, 0x7E, 0x3C, 0x00, // %0x06, 0x24, 0x6E, 0x4A, 0x4E, 0x7B, 0x30, 0x00, // &0x06, 0x62, 0x76, 0x5A, 0x4F, 0x46, 0x42, 0x00, // '0x06, 0x69, 0x79, 0x59, 0x4D, 0x4F, 0x4B, 0x00, // (0x07, 0x20, 0x74, 0x54, 0x54, 0x7C, 0xF8, 0x80, // ą0x05, 0x38, 0x7C, 0x44, 0x46, 0x45, 0x00, 0x00, // *0x06, 0x38, 0x7C, 0x54, 0x54, 0xDC, 0x98, 0x00, // +0x04, 0x51, 0x7F, 0x7F, 0x44, 0x00, 0x00, 0x00, // ,0x06, 0x7C, 0x7C, 0x04, 0x06, 0x7D, 0x78, 0x00, // -0x06, 0x38, 0x7C, 0x44, 0x46, 0x7D, 0x38, 0x00, // .0x06, 0x48, 0x5C, 0x54, 0x56, 0x75, 0x24, 0x00, // /0x06, 0x44, 0x64, 0x76, 0x5D, 0x4C, 0x44, 0x00, // 00x06, 0x44, 0x64, 0x75, 0x5D, 0x4C, 0x44, 0x00, // 1};#endifhttps://github.com/cbm80amiga/PropFonts/blob/master/c64enh_font.hmy Platformio.iniCode:[env:blackpill_f401cc]platform = ststm32board = blackpill_f401ccframework = arduinolib_deps = waspinator/AccelStepper@^1.64How do I fix this so that I can verify the code without any problems like in arduino ide 1.8?Thanks All.

author: ozcar
author_rank: Frequent Contributor
timestamp: March 12, 2025, 09:57:28 pm
content: Verify?If you don't want to edit the offending line yourself, you would have to persuade whoever maintains that code to change it.Otherwise turn off the warning usingCode:build_flags = -Wno-narrowingin your platformio.ini.

author: kimera
author_rank: Contributor
timestamp: March 13, 2025, 02:27:41 am
content: Quote from: ozcar on March 12, 2025, 09:57:28 pmVerify = build only not program to STM32