0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-05-18 16:01:18 +03:00

README.md

This commit is contained in:
OneOfEleven 2023-09-16 07:55:09 +01:00
parent 1e3b26768e
commit a24facec25
4 changed files with 47 additions and 55 deletions

View File

@ -1,11 +1,11 @@
# compile options
# you can enable ('1') or disable ('0') any/all of these you like
# compile options (see Readme.md)
# '0' = disable, 1 = enable
ENABLE_SWD := 0
ENABLE_AIRCOPY := 0
ENABLE_FMRADIO := 0
ENABLE_OVERLAY := 1
ENABLE_UART := 1
ENABLE_AIRCOPY := 0
ENABLE_FMRADIO := 0
ENABLE_NOAA := 0
ENABLE_VOICE := 0
ENABLE_ALARM := 0

View File

@ -1,42 +1,41 @@
# Open reimplementation of the Quan Sheng UV K5 v2.1.27 firmware
# Open reimplementation of the Quan Sheng UV-K5 v2.1.27 firmware
This repository is a cloned and customized version of DualTachyon's open firmware found here ..
https://github.com/DualTachyon/uv-k5-firmware
Am amazing achievement if you ask me !
A cool achievement if you ask me
# User customization
This version you can customize at compile time by making various changes to the makefile.
You can edit those changes by (currently) editing the MakeFile, look for these lines at the top of the file ..
You can customize the firmware by enabling/disabling various compile options.
You'll find the options at the top of "makefile" ('0' = disable, '1' = enable) ..
```
ENABLE_SWD := 0 enable only if you're using the CPU's SWD port (debugging/programming)
ENABLE_OVERLAY := 1 cpu FLASH stuff
ENABLE_UART := 1 without this you can't configure the radio with your PC
ENABLE_AIRCOPY := 0 easier to just type frequency in
ENABLE_FMRADIO := 0 FM band 2 RX
ENABLE_OVERLAY := 1
ENABLE_UART := 1 without this you can't configure the radio with your PC
ENABLE_NOAA := 0 NOAA channels
ENABLE_VOICE := 0 strange voices
ENABLE_NOAA := 0 Everything NOAA
ENABLE_VOICE := 0 want to hear voices ?
ENABLE_ALARM := 0 TX alarms
ENABLE_BIG_FREQ := 0 big font for the frequencies
ENABLE_KEEP_MEM_NAME := 1 maintain the channel name when (re)saving a memory channel
ENABLE_CHAN_NAME_FREQ := 1 show the channel frequency below the channel name/number
ENABLE_WIDE_RX := 1 enable the RX in the full 18MHz to 1300MHz (though frontend is not tuned for full range)
ENABLE_TX_WHEN_AM := 0 allow TX when RX set to AM
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1 use CTCSS tail phase shift rather than QS's 55Hz tone method
ENABLE_MAIN_KEY_HOLD := 1 keys 0-9 can be held down to bypass having to press the F-key
ENABLE_BOOT_BEEPS := 1 gives the user some audio feedback on the volume level knob position at boot-up
ENABLE_COMPANDER := 1 compander menu option - not yet fully operational
#ENABLE_SINGLE_VFO_CHAN := 1 not yet implemented
#ENABLE_BAND_SCOPE := 1 not yet implemented
ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz for RX (though frontend is not tuned for full range)
ENABLE_TX_WHEN_AM := 0 allow TX (always FM) when RX is set to AM
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1 use standard CTCSS tail phase shift rather than QS's own 55Hz tone method
ENABLE_MAIN_KEY_HOLD := 1 keys 0-9 can be held down to bypass having to first press the F-key
ENABLE_BOOT_BEEPS := 1 give user audio feedback on the volume knob position at boot-up
ENABLE_COMPANDER := 1 compander option - not yet fully operational
#ENABLE_SINGLE_VFO_CHAN := 1 not yet implemented - single VFO on display when possible
#ENABLE_BAND_SCOPE := 1 not yet implemented - spectrum/pan-adapter
```
To enable the custom option, set the above option to '1'
# Some other changes made
* Various original QS firmware bugs fixed
* Various QS firmware bugs fixed
* Added new bugs
* Finer RSSI bar steps
* Nicer/cleaner big numeric font than original QS big numeric font
@ -67,7 +66,7 @@ To compile directly in windows without the need of a linux virtual machine:
```
Then you can run 'win_make.bat' from the directory you saved this source code too.
You may need to edit the bat file (path to make.exe) depending on where you installed 'gnu_make' too.
You may need to edit the bat file (path to make.exe) depending on where you installed the above two packages too.
# Credits
@ -102,3 +101,9 @@ You may obtain a copy of the License at
See the License for the specific language governing permissions and
limitations under the License.
# Example changes
<p float="left">
<img src="/chan_freq_option.png" width="300" />
<img src="/F-CALI_menu.png" width="300" />
</p>

View File

@ -31,4 +31,3 @@ uint32_t FLASH_ReadNvrWord(uint32_t Address)
{
return overlay_FLASH_ReadNvrWord(Address);
}

View File

@ -94,16 +94,14 @@ uint32_t overlay_FLASH_ReadByAPB(uint32_t Offset)
{
uint32_t Data;
while (overlay_FLASH_IsBusy()) {
}
while (overlay_FLASH_IsBusy()) {}
overlay_FLASH_SetMode(FLASH_MODE_READ_APB);
FLASH_ADDR = Offset >> 2;
overlay_FLASH_Start();
while (overlay_FLASH_IsBusy()) {
}
while (overlay_FLASH_IsBusy()) {}
Data = FLASH_RDATA;
@ -120,11 +118,11 @@ void overlay_FLASH_SetArea(FLASH_AREA Area)
void overlay_FLASH_SetReadMode(FLASH_READ_MODE Mode)
{
if (Mode == FLASH_READ_MODE_1_CYCLE) {
if (Mode == FLASH_READ_MODE_1_CYCLE)
FLASH_CFG = (FLASH_CFG & ~FLASH_CFG_READ_MD_MASK) | FLASH_CFG_READ_MD_BITS_1_CYCLE;
} else if (Mode == FLASH_READ_MODE_2_CYCLE) {
else
if (Mode == FLASH_READ_MODE_2_CYCLE)
FLASH_CFG = (FLASH_CFG & ~FLASH_CFG_READ_MD_MASK) | FLASH_CFG_READ_MD_BITS_2_CYCLE;
}
}
void overlay_FLASH_SetEraseTime(void)
@ -135,8 +133,7 @@ void overlay_FLASH_SetEraseTime(void)
void overlay_FLASH_WakeFromDeepSleep(void)
{
FLASH_CFG = (FLASH_CFG & ~FLASH_CFG_DEEP_PD_MASK) | FLASH_CFG_DEEP_PD_BITS_NORMAL;
while (!overlay_FLASH_IsInitComplete()) {
}
while (!overlay_FLASH_IsInitComplete()) {}
}
void overlay_FLASH_SetMode(FLASH_MODE Mode)
@ -153,28 +150,20 @@ void overlay_SystemReset(void)
{
// Lifted from core_cm0.h to preserve function order in the object file.
__DSB(); /* Ensure all outstanding memory accesses included
buffered write are completed before reset */
SCB->AIRCR = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
SCB_AIRCR_SYSRESETREQ_Msk);
__DSB(); /* Ensure completion of memory access */
__DSB(); // Ensure all outstanding memory accesses included buffered write are completed before reset
SCB->AIRCR = (0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | SCB_AIRCR_SYSRESETREQ_Msk;
__DSB(); // Ensure completion of memory access
for(;;) /* wait until reset */
{
for (;;) // wait until reset
__NOP();
}
}
uint32_t overlay_FLASH_ReadNvrWord(uint32_t Offset)
{
uint32_t Data;
overlay_FLASH_SetArea(FLASH_AREA_NVR);
Data = overlay_FLASH_ReadByAHB(Offset);
overlay_FLASH_SetArea(FLASH_AREA_MAIN);
return Data;
}
@ -207,4 +196,3 @@ void overlay_FLASH_ConfigureTrimValues(void)
SARADC_CALIB_KD = (((Data >> 16) & 0xFFFF) << SARADC_CALIB_KD_KD_SHIFT) & SARADC_CALIB_KD_KD_MASK;
overlay_FLASH_SetArea(FLASH_AREA_MAIN);
}