Search Results

Search results 1-20 of 39.

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Not sure if this is an SES issue or STM32 issue, so posting here and in an ST forum... Trying to work with the STM32F411 USB OTG peripheral and compiling with Segger Embedded Studio, I'm having trouble clearing out the USB interrupts. The USB peripheral has IRQ bits that are write-1 to clear. As can be seen in the image below, the breakpoint has triggered under the case that the desired interrupts are cleared out (OTG_HOST_ONLY_IRQs evaluates to 0xF020000A), however, the debugger's register view…

  • So the issue was that code didn't run right due to the relocation of the application from 0x800_0000 to 0x800_8000. The real processor reset vector at 0x800_0000 is now unpopulated so under normal operating conditions the code fails to execute. If I edit the project to Debug->Debugger->Start From Entry Point Symbol to "No" then the execution from the IDE fails properly under debug mode, but in Release mode the code will still launch and execute correctly if I do "Build and Run" (until power cycl…

  • Attached are the map files and the file compare results of the compiled code for debug and release mode. Aside from formatting the differences appear to be related to address locations, so this information didn't help us any.

  • Hello- Our project is on the STM32F411 Discovery board produced and sold by ST. We have a project that is meant to run as a stand-alone image but also can be uploaded via USB to the STM32F411 that is also running our bootloader. To enable this behavior the memory map XML is edited to start the flash space at 0x08008000 instead of the normal 0x08000000. The __VTOR_CONFIG property is also defined for all configurations. This setup worked fine for quite a while but recently stopped running correctl…

  • Quote from SEGGER - SebastianB: “Alternatively we would recommend to instead always prepare and ship two images, both using static addresses but prepared for different positions. The bootloader would then select the appropriate image to flash and boot to. This removes the limitations regarding the position-independent code and simplifies the setup. ” Thank you, seems about as I thought then. This can get marked as "solved"...

  • Hello- please forgive the lateness of this reply, I'm on vacation at the time of writing. There is only one application image that we hope to be able to run from either flash section B or C. If for example the image was last successfully uploaded to region B, the bootloader will attempt the next upload to region C. If this process fails then there is still a valid image in region B the bootloader can branch to. The goal is to try and minimize the chances an end-user will render our device unusab…

  • Hello- We have a project using a bootloader on the STM32F411. Splitting the flash memory section into sections 'A' and 'B' and keeping the bootloader and application as separate projects (yes, there are ways to combine it, but we're not doing that for now) the bootloader running in flash section 'A' correctly receives, writes, and branches to the application in flash section 'B'. As a side note, the application project is compiling with the __VTOR_CONFIG option. As an additional level of safety …

  • As an addendum, I want to point out that this ST processor is unusual in that the flash memory pages are not divided equally as they are in literally every processor I've ever seen in a 20 year career: Source Code (8 lines)So it could be that the Segger tools are doing something incorrectly on this particular chip if the tools assumed all flash memory pages were of equal size when they aren't. As can be seen in my original post I tried splitting sector 0 off into its own section but this produce…

  • Thank you for the feedback. The issue isn't declaring a value to exist in a particular region per se, but I also need to split off the flash to divide it into a R/W section for user data and save the rest for the code. Following the advice from the Segger wiki to make a new flash memory section leads to a UsageFault_StateError before I can even verify that the desired variables are correctly placed, as outlined in my original post.

  • Our project uses SEGGER Embedded Studio for ARM Release 7.12a Build 2023031402.52776 and works with the STM32F411VET. There are end-user settings we want to store in flash so they can be modified and preserved between power cycles of the device. Looking around we found two major sources of information on how to pull this off, but neither worked completely correctly. The first comes from this Segger forum post (note that this is dated 2017, so may now be inaccurate) : [SOLVED] Placing data at a s…

  • Hello- We are working with : SEGGER Embedded Studio for ARM Release 7.12a Build 2023031402.52776 Windows x64 We are compiling 3rd-party code that uses the USB peripheral on the STM32L062. This code is expecting the linker to define a section for the USB's PMA memory area and auto-generate symbol __pma_end__, however, despite our attempts to edit the link process we constantly get errors that this symbol is not defined. After reading the Segger Wiki page covering the memory map XML format : wiki.…

  • Thank you for the reply. Quote from Segger - Nino: “ Remove that two lines from your batch script and it should behave as expected. Or call the Python script directly. ” It does not matter what variations I put in that would or would not leave a terminal window open if I ran the command directly from the command line. I never see a terminal window spawn nor do I see any output. I have tried to use BAT files that write log outputs so that I could verify the batch file even started but none are ev…

  • Hello all- For a project we are currently using : SEGGER Embedded Studio for ARM Release 7.12a Build 2023031402.52776 Windows x64 Our goal is to allow a Python script to execute when the build process completes. As I understand it, I cannot tell SES to directly execute the PY file. Instead, I have to run a batch file which in turn can execute the Python script. Going to the common project settings I selected our batch file as the Post-Build Command option. The batch file consists of this code : …

  • Using the J-Link probe to connect to an STM32L062 chip on a custom PCB with SES 7.12a as the IDE, I am now unable to connect the J-Link to the processor, even though this setup has worked previously with no issues. The log for connecting is : Connecting ‘J-Link’ using ‘USB 4294967295’ Loaded C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 7.12a/bin/JLink_x64.dll Firmware Version: J-Link ARM V8 compiled Nov 28 2014 13:44:46 DLL Version: 7.86c Hardware Version: V8.00 Target Voltage: 3.306 D…

  • Quote: “My next step would be to step into the "offending" code on instruction level, and watch relevant port and RCC registers. ” Everything craps out at the function prologue assembly for HAL_UART_Transmit() : ldr r0, =0x200007D8 <huart2>. I know bad things happen when we de-reference illegal areas of memory, but this command is just loading the address into a register. At this stage all the initialization for this function have been commented out. I've been using the "Debug - Internal" build …

  • Hi! I agree this seems like the debugger is perhaps being disconnected. The debugger pins for the L062 are PA13/14 while UART2 is PA2/3 and UART1 is PA9/10. None of my code touches the debugger pins but I am writing on top of the ST MXCube framework. If I comment out the Cube code to initialize the UARTs this issue still happens. Our dev board is a custom product that is as bare-bones as you can get, nothing is attached to any of the GPIO pins except a USB connector and we're also using the Cube…

  • In our project there is a UART transmission function that didn't appear to produce any output, so I edited the code to call it from an infinite loop so I could get it to just spam characters. In release mode, the code doesn't work but the device is still responsive, however, when I try to debug the code to see what is happening I am unable to do so. The two screenshots show the result before and after trying to enter the HAL_UART_Transmit() function. Everything appears normal here at the breakpo…

  • Hello- thank you for the time spent looking into this. I went back to double-check what was used, the code is sourced from "Embedded Systems: Real-Time Operating Systems for Arm Cortex M Microcontrollers", Jonathan Valvano, ISBN: 9781466468863, which from the title can be seen to cover Cortex M in general and not M0 specifically. Both the processors I used from TI and ST were from the Cortex M4 line, so while I am working with M0 now I was mistaken that I had been using M0 originally. I will hav…

  • Hello- Switching to '.balign 2' results in the same errors. I would have been surprised if that did work as I would have expected alignment on 0 to be more restrictive and therefore less likely to have issues. EDIT: Also having errors with balign 4 and 8...