Thundertronics 2020

For any questions and/or comments, please email me at georgy.moshkin@outlook.com

2020/08/11 – Simultaneous connection to WiFi internet and wired local network with TeamViewer over IP

If you connect computer to WiFi and LAN simultaneously many programs will be unable to access internet. One possible solution is to manually set connection priorities:
1. Open network & internet settings by right-clicking on connection sign near clock)
2. Ethernet → Change adapter options
3. Right-click on WiFi or Ethernet connection → Properties → TCP/IPv4 → General tab → “Advanced...” →
UncheckAutomatic metric”
4. For
WiFi connection set “Interface metric” to 1
5. For
Ethernet connection set “Interface metric” to 2

2020/08/08 – Using SCITER GUI with CodeBlocks 20.03

1. Project → Build Options → Click on project name in top-left corner above (by default only “Debug” is selected), modify following tabs:
2. Compiler settings tab → Compiler flags tab → select
Static linking [-static]”.
3. Linker settings tab → “Link libraries:” → Add →
libole32
4. Linker settings tab → “Other linker options:” → add
-municode
5. Search directories tab → Compiler tab → add path to SCITER include directory
6. Pre/post build steps → Pre-build steps → add packfolder.cmd
7. Create packfolder.cmd, edit it:
packfolder.exe resources resources.cpp -v "resources"
8. Copy packfolder.cmd and packfolder.exe to your project directory. Packfolder.exe utility is from SCITER SDK
9. Create “resources” directory in your project directory, put GUI html/script/image files in that directory
10. Applications now may be created similar to Sciter SDK
uminimal.cpp example (based on class frame: public sciter::window)
11. Don’t forget to copy sciter.dll to your Debug and Release directories

Add file icon to your project by creating resource.rc and adding it to your project by clicking on project name in Management left pane then “Add files…”. Resource.rc must contain text A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "youricon.ico". You can put different icon in window caption by copying it to “.\resources” directory and editing your GUI html tag as <html window-icon="anothericon.png">. You can edit GUI using Notepad++, then compile program using “Build and run F9”. Pre-build step will run packfolder utility and generate “resources.cpp” which must be included in “main.c”.

2020/08/05 – Running FAR manager as administrator without a UAC prompt (version 2)

1. Download farskipuacv2.zip
2. Run copy_files.cmd as administrator. "FAR (run as admin).lnk" shortcut will be placed on your desktop.
3. Now you can use "FAR (run as admin).lnk" shortcut to run FAR Manager as administrator without UAC message.

Works with FAR Manager x64 installed in default directory ("C:\Program Files\Far Manager\"). Nested shortcut calling made to preserve FAR window font size.

2020/01/10 – New website planned with projects related to BGT24 radar IC

This website will become a good source of information on BGT24 MMICs, and be useful for commercial product microwave engineers, and hopefully DIYers as well.

2019/11/21 – Faster backups from SSD to HDD using 7-Zip with integrated LZ4 support

1. Download and install 7-Zip with LZ4 support https://github.com/mcmilk/7-Zip-zstd/releases or https://mcmilk.de/projects/7-Zip-zstd/

2. Right-click on directory you want to backup from SSD disk, select output archive name on HDD disk, select compression method LZ4, compression level 1 (Fastest).

Depending on HDD/SSD/CPU speed ratios you may achieve interesting results. For example, with 60% compression ratio backup from SSD to HDD achieves 120mb/s throughput, which is higher than HDD 70mb/s write speed bottleneck. Again, this requires modified “7-Zip ZS” version of 7-Zip archive, check links to download installer. Author of modified version also provides small utility https://mcmilk.de/projects/USB-Backup/ to perform backups to removable USB drives and using 7-Zip ZS for compression.

2019/11/19 – Using STM32F4 CMSIS DSP library in STM32CubeIDE v1.1.0
(change paths according to your version)

1. Open Project → Properties → C++ general → Paths and Symbols

Find three header files (arm_common_tables.h, arm_const_structs.h, arm_math.h) in firmware package.

2. Under the tab “Libraries” add arm_cortexM4lf_math (note that actual file name starts with “lib” and ends with “.a”)

3. Under the tab “Library Paths” add path to libarm_cortexM4lf_math.a, for example:C:\Documents and Settings\user_name\STM32Cube\Repository\STM32Cube_FW_F4_version\Drivers\CMSIS\Lib\GCC

4. Under the tab “Symbols” add two values: __FPU_PRESENT, ARM_MATH_CM4 (note double underscore in __FPU_PRESENT)

5. Under the tab “Includes” add path C:\Documents and Settings\user_name\STM32Cube\Repository\STM32Cube_FW_F4_version\Drivers\CMSIS\DSP\Include

Flash and run without debug using STM32_Programmer_CLI
(change paths according to your version)

1. in Run → Debug Configurations double-click on first line "C/C++ Application" to create new configuration. Under the tab "Main" set "C/C++ Application" to C:\ST\STM32CubeIDE_1.1.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.1.0.201910081157\tools\bin\STM32_Programmer_CLI.exe, under the tab "Arguments" set "Program arguments" to -c port=swd -d ${project_loc}\${config_name:${project_name}}\${project_name}.elf -rst, under the tab "Common" check "Display in favorites menu" – "Run"
2. in Window → Preferences → General → Keys set Command "Run" Binding to Ctrl+F11 (error with command: gdb --version will not appear when using hotkey). With this configuration it is possible to quickly perform build and run by pressing Ctrl+B and then Ctrl+F11.

2019/9/12 – Fixing Aomei backupper backup slowdown (WIA service error)

On a fresh Windows 10 installation full backup of 120gb SDD to HDD takes around 5 to 20 minutes depending on data amount and disk speed. On my current computer Aomei backupper shows copy speed of more than 100mb/s, which is faster than HDD write speed, I think it is achieved because of default data compression works fast enough on my CPU. After few month there was a drastic slowdown to 20mb/s. I used Process Monitor and found out that “windows image acquisition” service constantly created thousands of error messages which logged on SSD disk. Slowdown problem was fixed by temporarily disabling WIA “windows image acquisition” using services.msc menu. There maybe other services or applications which result in backup slowdown. It is interesting to note, that task manager showed near zero write activity on SSD, but maybe because of many thousand small disk writes it affected shadow volume copy or other backup mechanisms of Aomei bacupper and resulted in 5 times slowdown.

2019/8/21 – Using FFT, FIR and other CMSIS DSP library math functions on STM32F4

1. Open Project → Properties → C++ general → Paths and Symbols

2. Under the tab “Libraries” add arm_cortexM4lf_math (note that actual file name starts with “lib” and ends with “.a”)

3. Under the tab “Library Paths” add path to libarm_cortexM4lf_math.a, for example: C:\Documents and Settings\user_name\STM32Cube\Repository\STM32Cube_FW_F4_version\Drivers\CMSIS\Lib\GCC

4. Under the tab “Symbols” add two values: __FPU_PRESENT, ARM_MATH_CM4 (note double underscore in __FPU_PRESENT)

5. Copy arm_math.h, const_structs.h and arm_common_tables.h from C:\Documents and Settings\user_name\STM32Cube\Repository\STM32Cube_FW_F4_version\Drivers\CMSIS\DSP\Include to your project.

Read this for more information on known problems:

https://community.st.com/s/question/0D50X0000At139aSQA/using-dsp-libraries-eg-armmathh-in-stm32cubeide-stm32f4

https://community.st.com/s/question/0D50X00009yH6h6SAC/why-fpupresent-and-amrmathcm4-are-not-defined-for-truestudio-projects-generated-in-stm32cubemx

2019/8/6 – Running FAR manager as administrator (use at your own risk)

1. Run copy_files.cmd from farskipuacv1.zip
2. Create shortcut to C:\Windows\System32\schtasks.exe /run /tn "farSkipUac"

Now you may use this shortcut to run FAR Manager as administrator without UAC message. Should work for 64-bit Far Manager if installed to default folder on Windows 10. Nested shortcut calling made to preserve FAR window font size.

2019/8/2 – STM32CubeIDE 1.0.2 flash and run without debug

Here is a way without installing st-link utilites. STM32CubeIDE ships with stm32_programmer_cli.exe command line tool, which can be used to flash and run.

1. Find file STM32_Programmer_CLI.exe in STM32CubeIDE directory, add it’s path to environment variables (in Windows system properties)
2. Use stm32_programmer_cli.exe -c port=swd -d C:\Users\W10\STM32CubeIDE\workspace_1.0.2\test1\Debug\test1.elf -s to perform flash and run (it may be used in a way similar to the post below, or as cmd file in post-build options)

2019/5/16 – STM32CubeIDE 1.0 Build and run / flash and run without debug

1. Install st-link utilites
2. in stm32cubeide open Project→ Properties→ C/C++ Build→ Settings→ tab "Tool Settings" → MCU Post build outputs check "Convert to Intel Hex file"
3. in Run → Debug Configurations double-click on first line "C/C++ Application" to create new configuration. Under the tab "Main" set "C/C++ Application" to C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ST-LINK_CLI.exe, under the tab "Arguments" set "Program arguments" to -c SWD -P ${project_loc}\${config_name:${project_name}}\${project_name}.hex -Rst, under the tab "Common" check "Display in favorites menu" – "Run"
4. in Window → Preferences → General → Keys set Command "Run" Binding to Ctrl+F11

With this configuration it is possible to quickly perform build and run by pressing Ctrl+B and then Ctrl+F11.

X射线荧光光谱仪

For any questions and/or comments, please email me at georgy.moshkin@outlook.com