I used JFlash to program the bootloader & application FW into STM32F103RC on board via Jlink.'Secure chip' was enable. The unit is able to upgrade the application FW via USB and this worked fine. The bootloader remove the protection, write the new firmware and enable the protection again.
Recently I wanted to modify the bootloader via USB. The idea was to upgrade an application FW first. This application FW was allowed to accept a bootloader image via USB. It was then expected to remove the protection, replace the bootloader and enable the protection again.
I tried some available functions such as
Anyway, I failed to program the bootloader successfully.
Does anyone know the method to achieve this purpose?
(Remark: If I disable 'Secure chip' during JFlash step in the beginning, I find USB upgrading for bootloader can succeed.)