I tried to reduced my hex file's size while converting to zip but it doesn't get size under 256KB due to which I am getting an error: Data size exceeds the limit.
Below are the screenshots for reference.
I need help to resolve this problem,




I tried to reduced my hex file's size while converting to zip but it doesn't get size under 256KB due to which I am getting an error: Data size exceeds the limit.
Below are the screenshots for reference.
I need help to resolve this problem,




It doesn't work that way. You need to reduce your code size, not attempt to compress the hex file.
Try compiling with size optimizations, disable logging, etc.
I don't have any project whose size is small all are bigger than 400 KB. What i should do?
Try compiling with size optimizations, disable logging, etc.
If you definitely can't reduce your code size, then you will need to get a SoC variant with larger flash.
What is SoC variant with larger flash?
Mm I just noticed that you're developing on an NRF51. That series only has SoCs with up-to-256 KB of Flash. The NRF52 series has SoCs with up to 1 MB of Flash.
Anyway, I'm not sure how are you even programming a 400 KB image onto a 256 KB memory.
Mm I just noticed that you're developing on an NRF51. That series only has SoCs with up-to-256 KB of Flash. The NRF52 series has SoCs with up to 1 MB of Flash.
Anyway, I'm not sure how are you even programming a 400 KB image onto a 256 KB memory.
Well actually, you don't really need to care about the size of the hex file. You need to care about the size of the binary. The hex file can be larger.
When I create hex file from makecode and flash it using usb is woking but when try to do it over Bluetooth it's not working
Binary is still same size of hex and is not reducing
Because Samsung microbit hex2bin converter is reducing size but its not woriking in ios lib of IOS-Pods-DFU-Library.
It doesn't reduce the size, it's just a different representation. A hex file is just a text file. A binary file is just 1's and 0's. Therefore the binary file it's smaller.
The hex file in the end is used to create a binary file. I believe that the DFU zip files have a binary inside, not a hex file.