<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>HJZ</title><link>http://hackjumpzero.ca/</link><description>Recent content on HJZ</description><generator>Hugo</generator><language>en</language><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Wed, 26 Nov 2025 00:00:00 +0000</lastBuildDate><atom:link href="http://hackjumpzero.ca/index.xml" rel="self" type="application/rss+xml"/><item><title>TIL - gitsha with dirty</title><link>http://hackjumpzero.ca/posts/2025/11/til-gitsha-with-dirty/</link><pubDate>Wed, 26 Nov 2025 00:00:00 +0000</pubDate><guid>http://hackjumpzero.ca/posts/2025/11/til-gitsha-with-dirty/</guid><description>&lt;p>&lt;code>git describe --always --dirty --match=''&lt;/code>&lt;/p>
&lt;p>This command return the gitsha of HEAD, in short form, and attaches &lt;code>-dirty&lt;/code> suffix if there is change in tracked files. &lt;code>7e68a98&lt;/code>, &lt;code>7e68a98-dirty&lt;/code>.
Staged files is also considered as dirty.&lt;/p>
&lt;p>The &lt;code>--match=&amp;quot;&amp;quot;&lt;/code> avoid matching to any nearby git tags, and always return the gitsha.&lt;/p>
&lt;p>This is helpful sometime in build system for tracking application version.&lt;/p></description></item><item><title>Cortext M chip reset behaviour</title><link>http://hackjumpzero.ca/posts/2025/04/cortext-m-chip-reset-behaviour/</link><pubDate>Sun, 06 Apr 2025 00:00:00 +0000</pubDate><guid>http://hackjumpzero.ca/posts/2025/04/cortext-m-chip-reset-behaviour/</guid><description>&lt;p>Upon power-on reset, the Cortex-M processor&amp;rsquo;s initial actions involve accessing the vector table
• The core first reads the initial Stack Pointer (SP) from the first entry of the vector table (at address &lt;strong>0x00000000&lt;/strong>)
• Then, the core reads the start Program Counter (PC), which is the reset vector, from the second entry of the vector table (at address &lt;strong>0x00000004&lt;/strong>) The Link Register (LR) is also set to &lt;strong>0xFFFFFFFF&lt;/strong>
• Execution then begins at the address pointed to by the reset vector.&lt;/p></description></item><item><title>Goose on weekend side projects</title><link>http://hackjumpzero.ca/posts/2025/03/goose-on-weekend-side-projects/</link><pubDate>Mon, 10 Mar 2025 00:00:00 +0000</pubDate><guid>http://hackjumpzero.ca/posts/2025/03/goose-on-weekend-side-projects/</guid><description>&lt;p>I spent some of my limited spare time between childcare duties working on a project: creating llvm-binary-releases using Goose. The goal was straightforward: take an LLVM release package, extract the specific clang tool binary I needed, and produce a new platform/OS-specific release. I planned to set up a hermit package for clang-format because finding pre-built clang binaries is surprisingly difficult. While native package managers are available, they tend to complicate dependency management in build systems, so I decided to solve the problem myself.&lt;/p></description></item><item><title>Dev notes from Feb 2025</title><link>http://hackjumpzero.ca/posts/2025/02/dev-notes-from-feb-2025/</link><pubDate>Fri, 28 Feb 2025 00:00:00 +0000</pubDate><guid>http://hackjumpzero.ca/posts/2025/02/dev-notes-from-feb-2025/</guid><description>&lt;h3 id="git-performance-tracing">Git performance tracing&lt;/h3>
&lt;p>I noticed that some git commands, especially &lt;code>git status&lt;/code>, were taking a long time to execute. Since it&amp;rsquo;s tied to my command prompt, this also slowed down my prompt. By using &lt;code>GIT_TRACE=1&lt;/code>, I could see what git was doing. The issue was that the repository had too many submodules, causing &lt;code>git status&lt;/code> to run on each one, which took time.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ GIT_TRACE&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">1&lt;/span> git status
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>14:40:25.548035 git.c:476 trace: built-in: git status
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>14:40:25.550695 run-command.c:667 trace: run_command: cd themes/hello-friend-ng; unset GIT_PREFIX; GIT_DIR&lt;span style="color:#f92672">=&lt;/span>.git git status --porcelain&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>14:40:25.550763 run-command.c:759 trace: start_command: /opt/homebrew/opt/git/libexec/git-core/git status --porcelain&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>14:40:25.557470 git.c:476 trace: built-in: git status --porcelain&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#ae81ff">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>On branch main
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Your branch is up to date with &lt;span style="color:#e6db74">&amp;#39;origin/main&amp;#39;&lt;/span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>14:40:25.567125 run-command.c:667 trace: run_command: GIT_INDEX_FILE&lt;span style="color:#f92672">=&lt;/span>.git/index git submodule summary --cached --for-status --summary-limit -1 HEAD
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>14:40:25.567200 run-command.c:759 trace: start_command: /opt/homebrew/opt/git/libexec/git-core/git submodule summary --cached --for-status --summary-limit -1 HEAD
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>14:40:25.573148 git.c:769 trace: exec: git-submodule summary --cached --for-status --summary-limit -1 HEAD
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="fish-shell-performance-tracing">Fish shell performance tracing&lt;/h3>
&lt;p>Similarly, the fish shell has a profiling feature:&lt;/p></description></item><item><title>Trigger DFU via USB on nRF52840 Dongle</title><link>http://hackjumpzero.ca/posts/2024/04/trigger-dfu-via-usb-on-nrf52840-dongle/</link><pubDate>Sat, 06 Apr 2024 00:00:00 +0000</pubDate><guid>http://hackjumpzero.ca/posts/2024/04/trigger-dfu-via-usb-on-nrf52840-dongle/</guid><description>&lt;p>The &lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle">NRF5280 dongle&lt;/a> is a great embedded development platform, especially for hobbyist project or quick prototyping. There is also a very similar product from &lt;a href="https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/programming/">Make Diary&lt;/a> with slightly different PCBA layout. It is generally a decent utility tool for BLE related work. These functionality can all be done out of box with the nrf desktop tool without doing any programming.&lt;/p>
&lt;p>There are plenty of blog post on this already that covers introductory programming with the nordic part.
But one interesting feature that I run into while working with this dongle was how to trigger DFU programming quickly.&lt;/p></description></item><item><title>About</title><link>http://hackjumpzero.ca/about/</link><pubDate>Tue, 28 Sep 2021 21:33:00 -0400</pubDate><guid>http://hackjumpzero.ca/about/</guid><description>&lt;p>Hello, I&amp;rsquo;m Hantian James Zhao. I&amp;rsquo;m a Embedded/Firmware Software Engineer. I have spend most of my career writing software that runs on embedded hardwares.
I am Canadian-Chinese, complete fluent in English, conversational in Chinese, and barely survivable French and Japanese.
My current home is Somerville, Massachusetts.&lt;/p></description></item><item><title>My resume</title><link>http://hackjumpzero.ca/resume/</link><pubDate>Tue, 28 Sep 2021 21:33:00 -0400</pubDate><guid>http://hackjumpzero.ca/resume/</guid><description>&lt;hr>
&lt;h1 id="past-employments">Past employments&lt;/h1>
&lt;h3 id="google-geo-sustainabilitysenior-software-engineer">&lt;a href="https://www.sidewalklabs.com/products/pebble">Google Geo Sustainability&lt;/a>|&lt;em>Senior Software Engineer&lt;/em>&lt;/h3>
&lt;ul>
&lt;li>LTE modem product bring up, integration, field deployment for protoype studies in 10+ sites over US&lt;/li>
&lt;li>Redesigned and migrated FW project to GN build system, improve build time and eliminate flakly builds&lt;/li>
&lt;li>Implemented python host tools framework for developers and field ops&amp;rsquo; speeding up daily operations&lt;/li>
&lt;li>Automating github CI framework with on device HW test&lt;/li>
&lt;/ul>
&lt;h3 id="verily-life-sciencessenior-firmware-engineer--tech-lead">&lt;a href="https://verily.com/">Verily Life Sciences&lt;/a>|&lt;em>Senior Firmware Engineer / Tech Lead&lt;/em>&lt;/h3>
&lt;ul>
&lt;li>Firmware Lead of &lt;a href="https://verily.com/solutions/verily-patch/">Verily Patch&lt;/a> &lt;strong>Class 1 med device&lt;/strong>, taking it from start to pilot&lt;/li>
&lt;li>Drove product &lt;strong>Bluetooth SIG&lt;/strong> certification and &lt;strong>FDA 510K&lt;/strong> certification&lt;/li>
&lt;li>Manage cross functional team communication and product schedules&lt;/li>
&lt;li>Technical mentor-ship of junior team members&lt;/li>
&lt;li>Oversaw FW release process and implementation of release infrastructure&lt;/li>
&lt;/ul>
&lt;h3 id="verily-life-sciencesfirmware-engineer">&lt;a href="https://verily.com/">Verily Life Sciences&lt;/a>|&lt;em>Firmware Engineer&lt;/em>&lt;/h3>
&lt;ul>
&lt;li>Enabled HW &lt;strong>factory manufacturing&lt;/strong> flow in China&lt;/li>
&lt;li>Achieved multiple internal/external user studies and &lt;em>GA launch&lt;/em>&lt;/li>
&lt;li>Own multiple core system components&lt;/li>
&lt;li>Published &lt;strong>python host tools&lt;/strong> to internal and external users&lt;/li>
&lt;li>Bring up and maintain &lt;strong>BLE&lt;/strong> communication stack on Nordic &lt;strong>NRF528xx&lt;/strong>&lt;/li>
&lt;/ul>
&lt;h3 id="squareandroid-platform-engineer">&lt;a href="https://squareup.com/">Square&lt;/a>|&lt;em>Android Platform Engineer&lt;/em>&lt;/h3>
&lt;ul>
&lt;li>Developed custom Android Platform for new &lt;a href="https://squareup.com/us/en/hardware/register">POS register&lt;/a>&lt;/li>
&lt;li>Designed and Implemented &lt;strong>WIFI&lt;/strong> + &lt;strong>USB&lt;/strong> log monitoring services for telemetry purpose&lt;/li>
&lt;li>Debugged and optimized &lt;strong>Android WIFI stack&lt;/strong>&lt;/li>
&lt;li>Implemented over the air system upgrade components&lt;/li>
&lt;/ul>
&lt;h3 id="squareembedded-software-engineer">&lt;a href="https://squareup.com/">Square&lt;/a>|&lt;em>Embedded Software Engineer&lt;/em>&lt;/h3>
&lt;ul>
&lt;li>Developed firmware and help ship 2 Square &lt;a href="https://squareup.com/us/en/hardware/contactless-chip-reader">credit card reader&lt;/a> products&lt;/li>
&lt;li>Build up and maintained a CI/CD on-device HW test infrastructure&lt;/li>
&lt;li>Implemented a &lt;strong>USB&lt;/strong> stack on Freescale Kinetis MCUs&lt;/li>
&lt;li>Design and Implemented &lt;strong>battery&lt;/strong> management and power control logic for Square card readers&lt;/li>
&lt;li>Implement &lt;strong>JTAG/GDB/OpenOCD&lt;/strong> support for new custom silicon&lt;/li>
&lt;/ul>
&lt;h3 id="nvidiaandroid-platform-software-engineer">&lt;a href="https://www.nvidia.com/">Nvidia&lt;/a>|&lt;em>Android Platform Software Engineer&lt;/em>&lt;/h3>
&lt;ul>
&lt;li>Developed hardware feature verification tests of Tegra4 &lt;strong>crypto engine&lt;/strong>&lt;/li>
&lt;li>Maintained and developed &lt;strong>Trustzone&lt;/strong> secure OS on Tegra Android&lt;/li>
&lt;li>Maintained and developed &lt;strong>Widevine&lt;/strong>, &lt;strong>HDCP&lt;/strong> key management in Android&lt;/li>
&lt;li>Designed and developed Trustzone secure OS build flow within Android&lt;/li>
&lt;li>Work with &lt;strong>OpenOCD&lt;/strong>, open source project, to bring a kernel debugger compatible with Tegra 3 devices&lt;/li>
&lt;/ul></description></item></channel></rss>