From pinghigh24678 at outlook.com Wed Nov 15 03:27:22 2023 From: pinghigh24678 at outlook.com (D Tibrella) Date: Wed, 15 Nov 2023 02:27:22 +0000 Subject: About the Compatibility of GNUK 2.1 Firmware with ST Link v2 In-Reply-To: References: Message-ID: I'm making a GNUK token with a ST Link v2 (maybe a replica but with genuine STM32F103C8T6) with GNUK 2.1. But I encountered a prompt of 'card error' while generating the key/executing the KEYTOCARD command. When using GNUK 1.2.20 firmware, it can function normally, so it should not be a problem with flash memory size. (The firmware volume of this version is nearly 30 kb larger than that of version 2.1) The MCU is genuine because ST-Link Utility could identify and update it. And I have tried burning in different ways and the results are the same (OpenOCD/tools from downloader manufacturer). Build Environment: arm-none-eabi-picolibc 1.8.5 arm-none-eabi-gcc 13.2.0 May I ask if you have had any experience with this problem? Due to my limited free time, I may not be able to debug for a while. However, I will be happy to provide you with the information you need. English is not my first language. I apologise for any offence. From gniibe at fsij.org Wed Nov 15 05:27:40 2023 From: gniibe at fsij.org (NIIBE Yutaka) Date: Wed, 15 Nov 2023 13:27:40 +0900 Subject: About the Compatibility of GNUK 2.1 Firmware with ST Link v2 In-Reply-To: References: Message-ID: <87r0krprnn.fsf@akagi.fsij.org> Hello, D Tibrella wrote: > arm-none-eabi-gcc 13.2.0 I haven't tested GCC 13.2 yet. It may be the cause. I'll test when it will be available in Debian. Do you mean that Gnuk 1.2.20 built with arm-none-eabi-gcc 13.2.0 works? -- From pinghigh24678 at outlook.com Wed Nov 15 16:16:43 2023 From: pinghigh24678 at outlook.com (D Tibrella) Date: Wed, 15 Nov 2023 15:16:43 +0000 Subject: About the Compatibility of GNUK 2.1 Firmware with ST Link v2 In-Reply-To: <87r0krprnn.fsf@akagi.fsij.org> References: <87r0krprnn.fsf@akagi.fsij.org> Message-ID: Hello, there is the latest test. > I haven't tested GCC 13.2 yet. It may be the cause. I'll test when it will be available in Debian. I built GNUK 2.1 with arm-none-eabi-gcc version 12.2.1 20221205 (15:12.2.rel1-1) and picolibc-arm-none-eabi version 1.8-1. These packages are from the latest Debian 12 official apt software source. But I still get "Card Error" on the token. Could you tell me the version of your toolchains? From gniibe at fsij.org Thu Nov 16 00:49:47 2023 From: gniibe at fsij.org (NIIBE Yutaka) Date: Thu, 16 Nov 2023 08:49:47 +0900 Subject: About the Compatibility of GNUK 2.1 Firmware with ST Link v2 In-Reply-To: References: <87r0krprnn.fsf@akagi.fsij.org> Message-ID: <875y22r2zo.fsf@akagi.fsij.org> Hello, D Tibrella wrote: > But I still get "Card Error" on the token. > > Could you tell me the version of your toolchains? It is explained in the gnuk/README: binutils-arm-none-eabi 2.40-2+18+b1 gcc-arm-none-eabi 15:12.2.rel1-1 picolibc-arm-none-eabi 1.8-1 gdb-multiarch 13.1-3 When I released Gnuk 2.1, I built Gnuk for FST-01 and FST-01SZ, those are my daily use. I also built Gnuk Emulation for GNU/Linux and tested. If you applied some patches, please show us. --