STM32F10x_StdPeriph ライブラリで STM32F103ZG を使用しています。Keil ARM-MDK を使用してプロジェクトの開発を開始しましたが、現在は GCC に移行しています。これまでのところ、切り替えは非常にスムーズに進んでいます。FLASH の最後のページを構成ページとして使用して、製品固有のパラメーターを保存します。これは明らかにバンク 2 にあるページです。場合によっては、これらの構成パラメーターを実行時に更新する必要がありますが、GCC に移行したので、書き込みを試みるとすぐに 2 番目のメモリ バンクがビジー状態になります。それから、電源を入れ直すまでビジーのままです。消去は正常に動作しますが、書き込みは失敗します。すべての FLASH のロックを解除し、FLASH にアクセスするためにすべてのクロックが初期化されていることを確認します。いくつかのフォーラムの他のいくつかの投稿は、私のリンカー ファイルの問題を示唆していますが、私が使用するすべての例は違いがありません。
誰かが私が間違っていることを教えてくれたら、とても感謝しています。
ありがとう、
H
_Min_Heap_Size = 0x800; /* required amount of heap */
_Min_Stack_Size = 0x800; /* required amount of stack */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x10000
FLASH_CFG (rx) : ORIGIN = 0x080FF800, LENGTH = 0x80
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x18000
}
SECTIONS
{
.text :
{
_stext = .; /* Provide the name for the start of this section */
CREATE_OBJECT_SYMBOLS
KEEP(*(.vectors))
*(.text)
*(.text.*)
. = ALIGN(4); /* Align the start of the rodata part */
*(.rodata)
*(.rodata.*)
*(.glue_7)
*(.glue_7t)
. = ALIGN(4); /* Align the end of the section */
} > FLASH
_etext = .; /* Provide the name for the end of this section */
.data : AT (_etext)
{
. = ALIGN(4); /* Align the start of the section */
_sdata = .; /* Provide the name for the start of this section */
*(.data)
*(.data.*)
. = ALIGN(4); /* Align the start of the fastrun part */
*(.fastrun)
*(.fastrun.*)
. = ALIGN(4); /* Align the end of the section */
} > RAM
_edata = .; /* Provide the name for the end of this section */
.bss :
{
. = ALIGN(4); /* Align the start of the section */
_sbss = .; /* Provide the name for the start of this section */
*(.bss)
*(.bss.*)
. = ALIGN(4); /* Align the end of the section */
} > RAM
_ebss = .; /* Provide the name for the end of this section */
._user_heap_stack :
{
. = ALIGN(4);
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(4);
} >RAM
_estack = ORIGIN(RAM) + LENGTH(RAM);
.static_cfg :
{
. = ALIGN(4);
*(.static_cfg)
*(.static_cfg.*)
. = ALIGN(4);
} > FLASH_CFG
_estatic_cfg = .;
_end = .;
PROVIDE (end = .);
}