Search found 18 matches

by jg1uaa
Sat Jan 14, 2023 5:41 am
Forum: Developer discussions
Topic: R2022022801: code optimization
Replies: 10
Views: 4414

Re: R2022022801: code optimization

VK3KYY wrote:
Sat Jan 14, 2023 12:46 am
I will not be merging any of your changes, because
To merge or not to merge, that is your decision. It's your project.

But please remember, current code has potential risk around SPI.
If you met something weird SPI related trouble, I hope my diff will be a hint to solve it.
by jg1uaa
Fri Jan 13, 2023 1:13 pm
Forum: Developer discussions
Topic: R2022022801: code optimization
Replies: 10
Views: 4414

Re: R2022022801: code optimization

void_spi_flash_disable() in source/hardware/SPI_Flash.c, set CS=high by PSOR register and immediately configure CS pin as input. It looks curious. I think CS pin should be always configured as output. Here is new diff, included previous __DSB() tweak. http://www.uaa.org.uk/gomitext/2023/20230108/SPI...
by jg1uaa
Thu Jan 12, 2023 8:44 am
Forum: Developer discussions
Topic: R2022022801: code optimization
Replies: 10
Views: 4414

Re: R2022022801: code optimization

source/hardware/SPI_Flash.c needs adding some __DSB() (data synchronization barrier instruction) to use -Os optimization.
diff: http://www.uaa.org.uk/gomitext/2023/202 ... ash.c.diff

Other codes seems to work with -Os...
by jg1uaa
Thu Jan 12, 2023 8:38 am
Forum: Developer discussions
Topic: R2022022801: code optimization
Replies: 10
Views: 4414

Re: R2022022801: code optimization

What will this code correction make better on FW? reducing code size increases a chance to add new feature into small ROM. reducing running unwanted binary saves battery waste. I think "-O0 works good, but optimized code does not work" is something trouble is hidden, so fix this improves code/produ...
by jg1uaa
Tue Jan 10, 2023 12:36 pm
Forum: Developer discussions
Topic: R2022022801: code optimization
Replies: 10
Views: 4414

Re: R2022022801: code optimization

I tested compiling following codes with -Os option on MCUXpressoIDE 11.6.1. R2022022801 on DM-1801 looks stable, and code size is reduced (_etext at 0x4ad44 -> 0x4a760). source/dmr_codec/codec_interface.c (#) source/firmware.c source/semihost_hardfault.c source/functions/sound.c source/interfaces/in...
by jg1uaa
Mon Jan 09, 2023 6:45 am
Forum: Developer discussions
Topic: R2022022801: code optimization
Replies: 10
Views: 4414

Re: R2022022801: code optimization

Files related to the CODEC blob in the official firmware also can't be optimised, as the use of the CODEC blob is basically a unavoidable hack I modified codec_interface.c and it runs with -Os optimization. I could not attach the diff here, uploaded it at https://pastebin.com/rXrj2Q4W I would send ...
by jg1uaa
Sun Jan 08, 2023 9:47 am
Forum: Developer discussions
Topic: R2022022801: code optimization
Replies: 10
Views: 4414

R2022022801: code optimization

I saw build log of R2022022801 release (now too old!) on MCUXpresso IDE and I found following codes are compiled with -O0 option. drivers/fsl_common_arm.c drivers/fsl_dspi.c drivers/fsl_notifier.c drivers/fsl_pmc.c drivers/fsl_rcm.c drivers/fsl_rtc.c drivers/fsl_uart.c source/SeggerRTT/RTT/SEGGER_RT...
by jg1uaa
Tue May 03, 2022 9:35 pm
Forum: Baofeng DM-1801 specific
Topic: [User built own firmware using incorrect libraries] cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
Replies: 13
Views: 9660

Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl

Hello, I told you that I did successfully flashed the released bin file. Also, I could imagine the number of reports we would had if it was not working. Hmm, my issue is the first case of the not-workig problem. But there is no hint to solve it. BTW, recently I found the souce code of R2022022801 is...
by jg1uaa
Thu Apr 07, 2022 5:56 am
Forum: Baofeng DM-1801 specific
Topic: [User built own firmware using incorrect libraries] cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl
Replies: 13
Views: 9660

Re: cannot boot DM-1801 R2022022801 with GD-77_V4.3.6.sgl

Hi, Firmware-Linux.exe worked successfully on Debian11 with udev rules at https://www.opengd77.com/viewtopic.php?t=771&start=20#p6883 but this is not current issue. It is problem that officialy released DM-1801.bin binary is not working on my DM-1801, programmed by any programming utility --- on Win...