Skip to main content
Associate II
November 22, 2025
Question

stedgeai generate change default memory location in octoflash target stm32n6 st-neural-art

  • November 22, 2025
  • 1 reply
  • 166 views

Hello,

Im trying to use the stedgeai generate command and want to move the data that gets located in the octoflash which seems to default to name=octoFlash offset=0x71000000 at times. Id like to relocate it at another position in the octoflash because i need to run several models. I tried adding the following that I found in an example and the output does not change at all from running it with the following options or not:

--binary --address 0x810000

or 

--binary --address 0x810000 --copy-weights-at 0xD0000000

I found these examples via a search but as I said they dont seem to change the output.

What am i doing wrong, I would like to change the default 0x71000000 to say something like 0x73000000, how can i accomplish this? I also tried to just change that in the network.c file, that didnt go well, just locked up the project at run time. 

 

Thanks

1 reply

Associate III
November 22, 2025

Hey,

Yes, don't edit the network.c file afterwards, that will cause a few headaches.

Take a gander at the .mpool file under the `Model\my_mpools` folder in the project.

I had to move my region to 0x70680000, and it worked fine.

...
{
"fname": "xSPI2",
"name": "octoFlash",
"fformat": "FORMAT_RAW",
"prop": { "rights": "ACC_READ", "throughput": "MID", "latency": "HIGH", "byteWidth": 1, "freqRatio": 6.00, "cacheable": "CACHEABLE_ON", "read_power": 110, "write_power": 400.0, "constants_preferred": "true" },
"offset": { "value": "0x70680000", "magnitude": "BYTES" },
"size": { "value": "128", "magnitude": "KBYTES" }
}
 
I am using the following in the generate script:
stedgeai generate --model model.tflite --target stm32n6 --st-neural-art default@user_neuralart_STM32N6570-DK.json --input-data-type int8

Don't forget to program the .hex file using the STM32CubeProgrammer tool

I hope that helps! If you've figured out how to not use a flash at all, that would be great if you could share that trick!

comlouAuthor
Associate II
November 22, 2025

exarian,

Thanks, I'll give it a try.

comlouAuthor
Associate II
November 22, 2025

exarian,

Looks like that worked, thanks. Have not used on target yet, but sure looks right.

 

As for you question, not sure of this gets you what you are looking for, but I removed the octoflash section in the JSON file (user_neuralart_STM32N6570-DK.json) and it looks like it defaulted to RAM, 0x90000000 for me

"mempools": [
{
"fname": "AXIFLEXMEM",
"name":  "flexMEM",
"fformat": "FORMAT_RAW",
"prop":   { "rights": "ACC_WRITE", "throughput": "MID",  "latency": "MID", "byteWidth": 8, "freqRatio": 2.50, "read_power": 9.381,  "write_power": 8.569 },
"offset": { "value": "0x34000000", "magnitude":  "BYTES" },
"size":   { "value": "0",        "magnitude": "KBYTES" }
},
........
{
"fname": "xSPI1",
"name":  "hyperRAM",
"fformat": "FORMAT_RAW",
"prop":   { "rights": "ACC_WRITE", "throughput": "MID", "latency": "HIGH", "byteWidth": 2, "freqRatio": 5.00, "cacheable": "CACHEABLE_ON","read_power": 380, "write_power": 340.0, "constants_preferred": "true" },
"offset": { "value": "0x90000000", "magnitude":  "BYTES" },
"size":   { "value": "16",         "magnitude": "MBYTES" }
},
////// REMOVED THIS BELOW (and the comma before this) ///////
{
"fname": "xSPI2",
"name":  "octoFlash",
"fformat": "FORMAT_RAW",
"prop":   { "rights": "ACC_READ",  "throughput": "MID", "latency": "HIGH", "byteWidth": 1, "freqRatio": 6.00, "cacheable": "CACHEABLE_ON", "read_power": 110, "write_power": 400.0, "constants_preferred": "true" },
"offset": { "value": "0x71000000", "magnitude":  "BYTES" },
"size":   { "value": "61",         "magnitude": "MBYTES" }
}
 
 
comlou_0-1763845400202.png

Hope this helps you.