Hello, I'm just starting with cortex-m3 and with gnu arm toolchain. My question may be stupid. What I wanted to ask: 1.I know that during the development it is posible to keep everything code and data in SRAM and not to program FLASH. Because the internal SRAM in the Cortex-m3 is 64KB max it may not be big enough. Is it posible to program External SRAM connected to cortex-m3 with data or program through OpenOCD and GDB? 2. Is it posible to program internal Flash with OpenOCD and GDB? And how to do that if yes? What is the sequence of commands in GDB? 3.Is it posible to program external FLASH connected to cortex-m3 with OpenOCD and GDB?
Paul Agadjanov wrote: >... > What I wanted to ask: > > 1.I know that during the development it is posible to keep everything > code and data in SRAM and not to program FLASH. > Because the internal SRAM in the Cortex-m3 is 64KB max it may not be > big enough. > Is it posible to program External SRAM connected to cortex-m3 with > data or program through OpenOCD and GDB? Should be possible. Have not tested this with a controller with CM3-core but with AT91SAM7SE (ARM7TDMI). You may have to enable the external memory-bus before it can be used to transfer the load-image into the external RAM. This can be done from OpenOCD by writing to registers during initialization. Check the controller's manual. > 2. Is it posible to program internal Flash with OpenOCD and GDB? And > how to do that if yes? What is the sequence of commands in GDB? Depends on target. STM32 should be fully supported (Spen?). I don't know if all LM3 are supported but at least some of them are. The OpenOCD manual (pdf) has some information on flash programming from gdb ("load"). > 3.Is it posible to program external FLASH connected to cortex-m3 with > OpenOCD and GDB? OpenOCD offers some infrastructure for this (i.e. for CFI) but the question can not be answered without more information (controller, external flash memory type/interface). You may ask in the OpenOCD developer-mailing-list but you should at least give the exact name of the used controller (the name of the ARM core is not enough) and the used external flash memory.
Martin Thomas wrote: > Paul Agadjanov wrote: > >>... >> What I wanted to ask: >> >> 1.I know that during the development it is posible to keep everything >> code and data in SRAM and not to program FLASH. >> Because the internal SRAM in the Cortex-m3 is 64KB max it may not be >> big enough. >> Is it posible to program External SRAM connected to cortex-m3 with >> data or program through OpenOCD and GDB? > Should be possible. Have not tested this with a controller with CM3-core > but with AT91SAM7SE (ARM7TDMI). You may have to enable the external > memory-bus before it can be used to transfer the load-image into the > external RAM. This can be done from OpenOCD by writing to registers > during initialization. Check the controller's manual. > >> 2. Is it posible to program internal Flash with OpenOCD and GDB? And >> how to do that if yes? What is the sequence of commands in GDB? > Depends on target. STM32 should be fully supported (Spen?). I don't know > if all LM3 are supported but at least some of them are. The OpenOCD > manual (pdf) has some information on flash programming from gdb > ("load"). > the latest openocd svn supports all low/medium and high density stm32 flash types. as Martin mentioned all the info is in the docs - the latest docs can always be found at: http://openocd.berlios.de/web/?page_id=54 simply the gdb load cmd is used. >> 3.Is it posible to program external FLASH connected to cortex-m3 with >> OpenOCD and GDB? > OpenOCD offers some infrastructure for this (i.e. for CFI) but the > question can not be answered without more information (controller, > external flash memory type/interface). > > You may ask in the OpenOCD developer-mailing-list but you should at > least give the exact name of the used controller (the name of the ARM > core is not enough) and the used external flash memory. Cheers Spen
Paul Agadjanov wrote: > Is it posible to program External SRAM connected to cortex-m3 with > data or program through OpenOCD and GDB? > 3.Is it posible to program external FLASH connected to cortex-m3 with > OpenOCD and GDB? In general this may not be a good idea due to the speed of external memory access. For example, the STM32 external bus is only 16-bit and access time is significantly slower than for internal SRAM or Flash. Running code from external memory may be as much as 10 times slower. Jack Peacock
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.