cancel
Showing results for 
Search instead for 
Did you mean: 

how to connect W25Q128JV with nucleo l432kc through standard spi

Dhatchaneswaran
Associate II

i have W25Q128JV with Nulceo l432kc, my program output .elf file size is 1500kb. so I want to connect external flash(W25Q128JV) with my nucleo L432kc board through SPI1 and i want store and run my code from W25Q128JV.

Can anyone please help me with this?

9 REPLIES 9
gbm
Lead III

You cannon directly run the code from Flash connected to SPI. It's possible with QSPI.

The first question is: what is taking up that much memory. I don't think you wrote 300000 lines of source code. Is it data? Variables? Constants? A picture maybe? Show the linker report with memory usage/section sizes.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
AScha.3
Chief III

>my program output .elf file size is 1500kb

Maybe - but this is NOT the program to flash !

On my program here the elf is 4 MB ! But code to flash is 169 KB .

So first think, and look , what IDE tells you about code size etc. ->

AScha3_0-1730809725080.png

 

 

If you feel a post has answered your question, please click "Accept as Solution".
Andrew Neil
Evangelist III

@Dhatchaneswaran wrote:

my program output .elf file size is 1500kb. ?


Is @AScha.3 said, the size of the ELF file is not the size of the executable code that goes into the microcontroller.

The ELF file contains a lot more information than just the executable code; therefore the size of the ELF file will be greater than the size of the executable code that goes into the microcontroller - and, therefore, than the size of Flash required.

The IDE build summary tells you the actual memory requirements. If that's still too big, what optimisation level are you using?

#ELFsize

How big is the .BIN file? What are you storing in it contributing to the size? Perhaps review .MAP file, or inspect .ELF with objdump/objcopy type tools. The .ELF is going to be mostly meta-data, so symbols, debug, etc stuff that doesn't live in the MCU's memory space.

You can attach external FLASH via SPI, you'll need to interact per commands in the data, and with HAL_SPI_TransmitReceive() type methods. You'd have to fetch content in to RAM for use, so managing the placement of content or a file system would likely be required.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

i am using optimization level as it is (maximum). may i change that?

Hello @Dhatchaneswaran ,

1- You didn’t confirm that you understood what others said about the size of ELF file.

2- You didn’t tell about the real size of the application either via build analyser or the size of the bin file.  
At this stage we don’t know if you really need an external memory for your application.
Could you please confirm the two points above in order to reduce the ping pongs?

Thanks

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Dhatchaneswaran
Associate II

thank you everyone, now i have sorted out what is the problem

Hello,

So please accept as solution the comment that answered your question or at least guided you to the right one.

Thank you.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Dany0
Associate II

If that can help, on youtube there is a series of 4-5 videos about W25Q and that where I've been able

to Read and Write easily. Very well explained.

Search ControllersTech + W25Q Flash.