Skip to main content

Posts

Showing posts with the label eclipse

STMicro STM32F10x CMSIS-SVD files appear to be missing lots of important registers

CMSIS-SVD is "Cortex Microcontroller Software Interface Standard" "System View Description". This is an ARM standard format for describing the registers and their bitfields for the Cortex-M series of ARM processors. If you have an account on the Arm website you can visit the STMicro cmsis page  where you can download the svd files for various STMicro processors. The STM32F10x svd files however appear to be missing important things like the system control block . This is an issue because I've been using the Eclipse plugin EmbSysRegView  to browse cpu registers during debug. The system control block is important because it contains various status registers that report fault status. These registers can help to locate issues in code or configuration. I posted a support question with ST and on their forums to see why their CMSIS-SVD doesn't appear to include all of the processors registers but I'll probably end up modifying the other EmbSysRegView proc...

Viewing embedded register values with Eclipse

Embedded processors tend to require a registers configuration beyond the traditional CPU registers found in the x86 architecture. Power, interrupts, clocks, I/O hardware modules can have from several to dozens of different registers that contain configuration settings. Having to find the address for each register is relatively painful. Some processors make it even more difficult with a configurable base address. Once you've found the address you want you still have to figure out what the bits in the register mean and which configurations are valid. Embedded development Integrated Development Environments (IDEs) like IAR's Embedded Workbench provide helpful address to value mappings for internal registers. EmbSys RegView is a plugin for Eclipse that breaks out the processors registers and fields (although it appears to lack a mapping for the meaning of the individual fields and the valid values). Eclipse EmbSys Registers pane

gdb via Eclipse and OpenOCD

Why? I've been bringing up a gcc toolchain for ARM, specifically the STM32. So far the toolchain looks good. I'm able to build binaries with it and downloading and debuging via OpenOCD, a STLINK/V2 low cost debugger and gdb works as expected. Gdb as an interface is fine but I find it helps to take advantage of a modern gui while debugging. Eclipse made it easy to configure the build with the cross compiler toolchain and it has a pretty good debugging interface. Some of the benefits of using an IDE are having multiple windows open to view registers and view several source files at once, searching and easily traversing the call stack. I'm not normally a fan of gui apps but sometimes it does help to have several sets of information visible at once during debugging. Get the right version of Eclipse I spent several hours trying to get openocd gdb to work with Eclipse Indigo(?) v3.8.1, the version in Ubuntu/Kubuntu 13.04. I even tried with the Zylin plugin. Nothing seeme...

Eclipse with a gcc ARM cross compiler

This site was quite useful in setting up Eclipse with the cross tool chain. The one thing I missed the first time was that the compiler prefix should end in a hyphen. Since I left that off I had to manually correct some of the paths in the project configuration.