Logitech M310

Since replacement mouse wheel encoder for my A4Tech X-710 turned out to be almost as imprecise as old one and it's USB cable has lost almost all isolation exposing wires (I guess chemical decomposition over time) and plastic cracked a little next to screws it's time to change mouse.
I've bought refurbished Logitech M310 for $12.
First impression:
  • it's "full size" mouse and it turns out it's very similar in size and shape to X-710
  • left and right button are nice but little louder than in A4Tech
  • middle/scroll button is slightly hard to use requiring some force to be pressed and pretty loud
  • scroll wheel moves quietly and with little resistance although still seems to be precise (contrary to opinions I've found on micro-precise scroll used e.g. in M325)
  • off-center optical sensor probably needs some time to adjust to (sensor in X-710 was placed exactly in the middle)
  • mouse feet seem interior to those (thicker and 6 instead of 4) in X-710
  • mouse worked out of the box (I'm not sure if paired earlier or does not require pairing), no software installation was necessary with Windows 7 
Because of asymmetric optical sensor location I wouldn't recommend it for people using left hand (or both hands) - when using with right hand it feels like it has lower dpi than X-710 (i.e. less than 1000) while using with left hand it behaves very strange. It must be related to anatomy - when rotating mouse with right hand cursor moves only a little (this is fine) while when rotating even little with left hand cursor moves whole screen length.
If you are using windows consider turning off "Allow this device to wake up the computer" option in device manager to not be surprised with accidental waking up of computer. Useful commands:
  • powercfg lastwake - check reason of last wakeup
  • powercfg -devicequery wake_armed - list devices allowed to wake PC
Although producer recommends alkaline cell (i.e. 1.5V cell) it works fine with charged NiMH eneloop 2000mAh cell. With my use (5-6 hours on work day, more on weekends, no ON/OFF switch used) it worked 2.5 months from this cell, down to 0.945V.

I am not noticing optical sensor performance drop after switching from X-710 which is probably good thing. I'm using cloth mouse pad thus these are not challenging conditions though.


Saleae logic analyzer clone

 Popular sub-$10 clone of USBee AX Pro / Saleae logic analyzer. Works with sigrok under Windows and under Linux (may require using unofficial package repository for ubuntu 14 or older). As open source firmware is used with sigrok there seems to be no copyright violation.
See also:
One of the limitations is incompatibility with 1.8V logic.
 Build quality might have been better as with one I bought case latches were not closing because LED diodes positions were not matching cuts in top cover.


ST-Link v2 clone

Popular cheap ST-Link v2 clone from China

STM32F101CBT6 is used instead of STM32F103CBT6 that may be found on "regular" ST-Link v2. Fun fact: STM32F101CBT6 does not officially has USB device.
See also: https://github.com/blacksphere/blackmagic/issues/62

Board markings MX-LINK V2 2016-01-18.


Promo: free C++ Builder 10.1 Berlin Starter

In the past few weeks price for C++ Builder Starter was jumping between €68 and €0 (free) while quoted regular price is €307. This IDE may have best days behind it but VCL still is my favorite GUI toolkit for native windows applications.
I've worked with it for about week porting some older application, so here are few notes:
  • as clearly stated it supports only Win32 target: I'm fine with it
  • limited commercial use: not a big problem
  • it cannot import project import from older BDS2006 thus project needs to be recreated manually - there are few gotchas for older BDS users
  • heavily reduced debugging functionality: no "Local variables", no "Attach to process", cannot expand/dererence aggregates - this is why I won't leave BDS2006
  • some code bloat, e.g. 2MB -> 4MB for not so complicated application
 There is also similar promotion for Delphi.


Eclipse usability notes

Remove unused toolbar items

Eclipse Mars installed as a part SW4STM32 uses two rows of toolbar items and most of them are probably not frequently used. To get rid of them use Window/Perspective/Customize perspective... menu.

Remove status bar

Status bar does not seem to present any useful information. Line numbers are displayed in editor window anyway, current column number and Insert/Overwrite mode state don't not seem important to me. To hide status bar open e4_basestyle.css file from Eclipse directory (in my case: Ac6\SystemWorkbench\plugins\org.eclipse.ui.themes_1.1.1.v20151026-1355\css) and add at the bottom of it:

#org-eclipse-ui-trim-vertical2 {
   visibility: hidden;

Update file timestamp before building

Project properties, C/C++ build, Settings, Build Steps, Pre-build steps:
${ProjDirPath}\build-tools/touch.exe ${ProjDirPath}\..\..\main.c
For a list of environment variables look at C/C++ Build, Build Variables and check "Show system variables":