pridebrazerzkidai.blogg.se

Segger embedded studio never hits breakpoint
Segger embedded studio never hits breakpoint










  1. #Segger embedded studio never hits breakpoint how to
  2. #Segger embedded studio never hits breakpoint windows 10
  3. #Segger embedded studio never hits breakpoint software

  • 3.1.1 J-Link WiFi in J-Link Configurator.
  • #Segger embedded studio never hits breakpoint windows 10

    1.2.2 Windows Defender under Windows 10.

    #Segger embedded studio never hits breakpoint software

    1 J-Link Software and Documentation Pack.This is not portable, not graceful, but I am using it as an exercise to understand the hardware, understand low level rust output. Preload_ptr = ((preload_ptr as usize) + 8) as *const u32 I'm using a quick/dumb inline assembly loop for my delays, in a rust macro: macro_rules! asm_delay That version will write a 1 bit out, the 0 bit version has 300/1100ns delays for the ws2812b lights. (make sure your compiler doesn't optimize out the unused reads)įirst, I minimized the size of my 'critical_timing' routines. Since the Flash Cache is shared for instructions/data, this brings the code in (at least for a while) Use normal memory loads to 'read' in your function (and throw it away) Has anybody done anything comparable? Any tips?įor others looking to do find ways to "preload" critical functions into the cache, it is doable.Ĭast your critical function to a byte or u32 pointer (Actually, maybe I could set up a DMA to do it for me! No real advantages, but it would be a chance to try out the DMA.) If I know the start address of my function (and make sure it isn't inlined!) and can estimate (overestimate) the size, I can do a quick ldrb of every 8th byte and pull the code in. In the 'maintenance' section, it implies that the cache line size is 8 bytes. The rp2040 datasheet indicates it is a 2-way set-associative 16KB cache, presumably with an LRU replacement policy (any access that hits the cache marks the 'hit' way as the most recently used for that set, and the other 'way' is targeted for the next replacement of that set). Some program loading magic copies it into RAM at boot It seems like I could do some inline assembly ldr instructions to pull in the code Preload the code into the 16K cache (plenty big!), and/or lock it in there.

    #Segger embedded studio never hits breakpoint how to

    Need to figure out how to find location/size of a function in rust, copy it, and run relocated version Mostly a question of how to do it in my current Rust/ pico-rs world

    segger embedded studio never hits breakpoint

    Programmatically copy the code in question from Flash to RAM, execute from RAM However, I still want to explore what it would take to get predictable/fast code performance for critical routines. Still doesn't really solve the problem of predictable timing for setting a pin if the associated "str" instruction isn't in the cache Timers/counters for better timing control PIO is the obvious one, reading up on that now Now, I know there are better ways to do the above (and I plan to switch):

    segger embedded studio never hits breakpoint

    This really messed with me at first, as I am not used to microcontrollers having cache problems. However, the first time through the loop, no surprise, everything is about 16x too slow as the instructions are brought in one bit at a time. It all works perfectly once the code is fetched from QSPI into the 16K cache. (yes I know, working on better approaches, see below). To get fine timing control I was using some in-line assembly 'nops'. I'm playing with ws2811/ws2812b light control on a pico, a simple rust program that bit-bangs a GPIO (level shifted to 5v) to control addressable LEDs.












    Segger embedded studio never hits breakpoint