<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tobias Aguiar on Medium]]></title>
        <description><![CDATA[Stories by Tobias Aguiar on Medium]]></description>
        <link>https://medium.com/@tobi.aguiar01?source=rss-13681c4e967a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Q3xGWE9tGmUW8vZGGcN4eQ.jpeg</url>
            <title>Stories by Tobias Aguiar on Medium</title>
            <link>https://medium.com/@tobi.aguiar01?source=rss-13681c4e967a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 03:23:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tobi.aguiar01/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What they don’t tell you about college-industry transition]]></title>
            <link>https://medium.com/@tobi.aguiar01/what-they-dont-tell-you-about-college-industry-transition-d1dea17839e4?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1dea17839e4</guid>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[college]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Wed, 19 Jul 2023 11:42:14 GMT</pubDate>
            <atom:updated>2023-07-19T11:42:14.394Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3CufdaIq8Jx3iNy_" /></figure><p>You enter an electronics/embedded systems college. Your parents are proud. You try hard to learn all the topics to become a good engineer.</p><p>Math, physics, electronics, programming, operating systems, computer architecture, and maybe some network and control theory.</p><p>You have labs and nice hands-on projects. Some students get the chance to have one or two internships. Others try to study more on their own with side projects. You obtain your degree.</p><p>However, even with all the hard work, you still can’t seem to find a job. The market is too competitive.</p><p>Even if you do find a job, you don’t feel good enough. You always feel that you lack knowledge in comparison to market demands.</p><p>Why is that? How can this be possible if I was a good student, had good grades because I learned the modules, and completed all the labs?</p><p>What did I miss? What did I do wrong that created this knowledge gap between the end of college and the beginning of the industry?</p><p>Well, this is partially my fault. I can’t deny that. I was playing the wrong game.</p><p>But this is a larger problem that I will discuss a little bit and analyze the truth behind all this.</p><h4>The traditional education system can’t satisfy students needs anymore</h4><p>Let’s consider that a college’s goal is to give tools to their students so they can be prepared for the market and the real world.</p><p>The first problem is that the traditional education system, where teachers spend around 90 minutes teaching something to students, does not work in your favor.</p><blockquote>But what does that mean?</blockquote><p>This means that you are being a passive learner. And when you’re being a passive learner :</p><ol><li>You don’t take ownership of your education experience, because someone else is conducting the content.</li><li>You can’t really know if you learned the topic or not because you don’t have a real situation where the knowledge is required.</li></ol><p>Knowing these problems, some good solutions emerge: <strong>hands-on labs and projects.</strong></p><p>With this solution, students now have the opportunity to practice the theoretical knowledge they have seen in the classroom.</p><p>Now, they should be prepared to face industry problems, right?</p><p>Well,<strong> not really</strong>.</p><p>When working in groups in these hands-on labs, students might develop collaboration and communication skills.</p><p>However, due to a lack of interest in the theoretical classes, some students end up depending on the teacher’s help during practical lessons.</p><p>This prevents them from developing a sense of independence at work, which is one of the core competencies the market demands from you, regardless of whether you’re going to work for a company or start your own.</p><h4>Transferring Responsibilities: The Internships</h4><p>Internships are a great opportunity for any student to work as closely as possible with the industry and gain an understanding of what the market expects from them.</p><p>However, due to the problems I mentioned earlier, many students face difficulties:</p><ol><li>Since some students have not developed a sense of independence, they tend to rely on their tutors when faced with challenging tasks.</li><li>The competitive market evolves much faster than the college curriculum does, resulting in the implementation of complex solutions within companies. This creates a significant knowledge gap for students, as they feel they lack the knowledge required by the market.</li><li>Some students become frustrated because their efforts in college seem to have no effect when they enter an internship and feel lost.</li><li>They find themselves compelled to learn on their own in order to catch up.</li></ol><h3>Final thoughts</h3><h4>Is the problem the university or the students?</h4><p>I would like to first give you a kind reminder : I am not complaining about anything, this is a reality I’ve been through and other colleagues I talked with agreed with me.</p><p>I firmly believe that every problem, including this one, has a solution. It is up to us to find those solutions.</p><blockquote>But first, the problem. University or students?</blockquote><p>This educational system was created somewhere between the 18th and 20th century, with the aim of democratizing access to education and creating a skilled and literate workforce to support the industrial and technological advancements of the time, particularly during the industrial revolution.</p><p>It transformed the lives of millions of people, and many incredible creations and research projects owe their existence to it.</p><p>However, the world is not perfect. How can we explain the fact that<a href="https://knowhow.distrelec.com/civil-engineering-and-infrastructure/why-is-there-a-shortage-of-skilled-workers-in-the-engineering-industry/#:~:text=The%20reasons%20behind%20the%20skills%20shortage&amp;text=Starting%20from%20downturn%20in%20innovation,investment%20in%20training%20and%20education."> there is a lack of skilled </a><a href="https://knowhow.distrelec.com/civil-engineering-and-infrastructure/why-is-there-a-shortage-of-skilled-workers-in-the-engineering-industry/#:~:text=The%20reasons%20behind%20the%20skills%20shortage&amp;text=Starting%20from%20downturn%20in%20innovation,investment%20in%20training%20and%20education.">engineers</a><a href="https://knowhow.distrelec.com/civil-engineering-and-infrastructure/why-is-there-a-shortage-of-skilled-workers-in-the-engineering-industry/#:~:text=The%20reasons%20behind%20the%20skills%20shortage&amp;text=Starting%20from%20downturn%20in%20innovation,investment%20in%20training%20and%20education."> for the market</a> demands? and in some countries how can you explain that<a href="https://capital.social/in-crisis-engineers-and-college-grads-working-for-delivery-apps-in-brazil/#google_vignette"> young engineers end up pursuing another </a><a href="https://capital.social/in-crisis-engineers-and-college-grads-working-for-delivery-apps-in-brazil/#google_vignette">underpaid</a> <a href="https://capital.social/in-crisis-engineers-and-college-grads-working-for-delivery-apps-in-brazil/#google_vignette">professions because they lack of opportunities</a>?</p><p>Let’s also talk about the other side of the problem : students (<strong>and I must include myself in this criticism, as I was once a student too</strong>).</p><p>Usually, students have the naive belief that when they enter in college (if it is not your case, congrats!), <strong>their lives will magically fall into place.</strong></p><p>They often think that simply obtaining a degree will solve all their problems, and they can coast through their college years, waiting for that piece of paper to secure their future.</p><p>They believe that they can just apply for jobs and their life will be sorted.</p><p>As a result of these misconceptions:</p><ol><li>They only study to have enough grades to progress, not necessarily to genuinely learn.</li><li>They want magic formula for the hands-on labs, searching for answers on internet.</li><li>In an increasingly immediate society, the tendency to outsource the search for solutions to one’s problems diminishes the development of independence.</li></ol><p>With all these problems arising, are there any existing solutions?</p><h4>Is there a short-term solution for that?</h4><blockquote><strong>Disclaimer</strong> : In this section, everything you are about to read represents solely my opinion on the topic.</blockquote><p>I honestly have no idea if the college structure will improve so that engineers can get more opportunities for engineers upon graduation.</p><p>But what you should know is :</p><ol><li>The situation does not appear to be improving in the near future.</li><li>The embedded market (or any tech market) will get way more competitive than it already is.</li><li>The complexity of the solutions required by companies and the market itself will only increase. The foundational content taught in colleges is not updated frequently enough to align with market trends.</li><li>It is possible that AI will be able to do tasks a fresh graduated engineer can do.</li><li>The cost of living is expected to rise due to global issues such as wars and environmental concerns.</li></ol><p>And what is my point saying all of this?</p><p><strong>Soon, simply being good at what you do won’t be enough anymore.</strong></p><ol><li>Side projects will no longer be just a distinguishing factor; they will be necessary for you to gain hands-on experience in order to apply it to jobs with a high demand for knowledge.</li><li>Networking and participating events will be essential for you to be in touch with the industry and understanding employers’ expectations.</li><li>Books, magazines, and blogs will also guide you towards acquiring the skills that suit you best.</li></ol><p>I genuinely hope that I am mistaken about all of this.</p><p>If you are not facing these problems in your reality, I truly admire you.</p><p>And if you are currently living or have experienced this reality, you’re not alone. The solutions are not easy, but they are possible.</p><p>Those possibilities seem scary, they serve as my motivation. I will need to become an even greater version of me to handle this. I eagerly await that transformation!</p><p>Once again, thank you so much for reading my thoughts!</p><p>Remember, you don’t have to believe everything I’ve said. This is simply the reality I have personally experienced and I’m thankfully overcoming. :).</p><p>If you have something to add/comment, feel free to do it!</p><p>Happy reading/coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1dea17839e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write your put string program on your arduino! -embedded tutorials 3]]></title>
            <link>https://medium.com/@tobi.aguiar01/write-your-put-string-program-on-your-arduino-embedded-tutorials-3-4e99515ccf4b?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e99515ccf4b</guid>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Fri, 19 May 2023 18:23:08 GMT</pubDate>
            <atom:updated>2023-05-21T13:28:04.063Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EMqmlIqTmb0_RjWa" /><figcaption>Photo by <a href="https://unsplash.com/fr/@harrisonbroadbent?utm_source=medium&amp;utm_medium=referral">Harrison Broadbent</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I’m sure you have already seen this program :</p><pre>#include &lt;stdio.h&gt;<br><br>int main(void) {<br>  puts(&quot;Hello world!&quot;);<br>}</pre><p>In case you haven’t, this is the most basic C program you can do (as far as I cant tell).</p><p>I’ll write this same program in an Arduino board!</p><p>And the good news is : you only need a board with a cable!</p><h3>Introduction : how are going to print a Hello world without puts function?</h3><p>If you are asking yourself this question, I don’t blame you, it is normal when we are in early career.</p><p>But what I will propose you to do is to change your question.</p><p>To know the answer for the question, you need to start change your mind. There is a quote from the book “The pragmatic programmer” (if you want to read an article about it, click <a href="https://medium.com/@tobi.aguiar01/this-book-simply-changed-my-life-as-a-software-developer-f58ba7c9c69">here</a>) that says :</p><blockquote>“Developers should be like detectives, seeking clues and asking questions until they can piece together the solution to a problem.”</blockquote><p>And this applies to the even most basic questions.</p><p>When you wrote your C “Hello world” program, you should ask yourself :</p><blockquote>“How this ‘Hello world’ message gets to my screen?”</blockquote><p>When you find the answer for this questions, you just can replicate it to the microcontroller.</p><h3>What is USART (or UART) ?</h3><p>USART (Universal Synchronous/Asynchronous Receiver/Transmitter) and UART (Universal Asynchronous Receiver/Transmitter) are commonly used communication protocols in microcontroller systems to transmit and receive data between devices.</p><p>USART supports both synchronous and asynchronous communication modes, while UART only supports asynchronous mode. Synchronous communication requires a clock signal to synchronize data transfer between devices, while asynchronous communication does not.</p><p>Put simple, The Arduino has dedicated hardware components called USART or UART, which are used to transmit and receive data. When the Arduino wants to send data to another device, it writes the data to a transmit buffer, which is sent out over a dedicated transmit line. When the Arduino receives data from another device, the data is received on a dedicated receive line and stored in a receive buffer.</p><h3>The code</h3><h4>Initializing UART/USART</h4><p>The atmega328p’s datasheet, states precisely how you should initialize it :</p><blockquote>“The USART has to be initialized before any communication can take place. The initialization process normally consists of setting the baud rate, setting frame format and enabling the transmitter or the receiver depending on the usage.”</blockquote><p>You can find the datasheet <a href="https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf">here</a>.</p><p>So how can this be implemented on a simple C code? Here’s a sneak peek :</p><pre>#define BAUD 9600<br>#define UBRR_VAL ((F_CPU/16/BAUD) - 1)<br><br>void uart_init() {<br>  UBRR0H = (unsigned char)(UBRR_VAL &gt;&gt; 8);<br>  UBRR0L = (unsigned char)UBRR_VAL;<br>  UCSR0B = (1 &lt;&lt; TXEN0);<br>  UCSR0C = (1 &lt;&lt; UCSZ01) | (1 &lt;&lt; UCSZ00);<br>}</pre><h4>Sending a char</h4><p>When sending a frame through UART, you need to first make sure that the transmission is enabled. This can be done by setting the transmit enable (TXEN) bit in the UCSRnB register.</p><blockquote>Where did you get this from?</blockquote><p>As always.. <strong>datasheet</strong>.</p><p>Usually, you can send frames from 5 to 9 bits. It means that we can choose the transmission as being done one byte at a time.</p><pre>void uart_putchar(char c) {<br>  while (!(UCSR0A &amp; (1 &lt;&lt; UDRE0)));<br>  UDR0 = c;<br>}</pre><p>The function simply waits for the transmit buffer to be empty (UDRE0 flag), before loading it with new data.</p><p>As soon as it is ready, the CPU can load the transmit buffer by writing to the UDR0 I/O location.</p><h4>Sending a string</h4><p>If you know how to send a char via UART, sending a string becomes easy : You send a string one byte at a time!</p><pre>void uart_puts(char *s) {<br>  while (*s) {<br>    uart_putchar(*s++);<br>  }<br>}</pre><h3>The main program</h3><p>Let’s put the two created functions all together and let’s create our main file which will be responsible to send the string.</p><pre>#define F_CPU 16000000UL<br><br>#include &lt;avr/io.h&gt;<br>#include &lt;util/delay.h&gt;<br>#include &lt;avr/interrupt.h&gt;<br><br>#define BAUD 9600<br>#define UBRR_VAL ((F_CPU/16/BAUD) - 1)<br><br>void uart_init() {<br>  UBRR0H = (unsigned char)(UBRR_VAL &gt;&gt; 8);<br>  UBRR0L = (unsigned char)UBRR_VAL;<br>  UCSR0B = (1 &lt;&lt; TXEN0);<br>  UCSR0C = (1 &lt;&lt; UCSZ01) | (1 &lt;&lt; UCSZ00);<br>}<br><br>void uart_putchar(char c) {<br>  while (!(UCSR0A &amp; (1 &lt;&lt; UDRE0)));<br>  UDR0 = c;<br>}<br><br>void uart_puts(char *s) {<br>  while (*s) {<br>    uart_putchar(*s++);<br>  }<br>}<br><br>int main(void) {<br>  uart_init();<br>  <br>  while (1) {<br>    uart_puts(&quot;Hello, world!\r\n&quot;);<br>    _delay_ms(1000);<br>  }<br>  <br>  return 0;<br>}</pre><p>We’re going to use a little delay, so we need to include the &lt;util/delay.h&gt; header.</p><p>If you want to get in more details about it, I have two other arduino tutorials where I get in much more details about all headers and structures being used. You can check them <a href="https://medium.com/@tobi.aguiar01">here</a>.</p><h3>The Makefile</h3><p>To avoid using lots of commands to be able to flash the program onto the board, we’re going to build a makefile.</p><p>It will be built as we were in a big project, where this makefile can be scaled to have more files and being automated :</p><pre>CC = avr-gcc<br>CFLAGS = -mmcu=atmega328p -D_FCPU=160000000U -Wall -Os <br>OBJCOPY = avr-objcopy<br>SRC_DIR = src<br>OBJ_DIR = obj<br>BIN_DIR = bin<br>TARGET = main<br><br>$(shell mkdir -p $(OBJ_DIR) $(BIN_DIR))<br><br>$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c<br> $(CC) $(CFLAGS) -c $&lt; -o $@<br><br>$(OBJ_DIR)/main.o: main.c<br> $(CC) $(CFLAGS) -c $&lt; -o $@<br><br>$(BIN_DIR)/$(TARGET).elf: $(OBJ_DIR)/main.o<br> $(CC) $(CFLAGS) $^ -o $@<br> $(OBJCOPY) -O ihex -R .eeprom $(BIN_DIR)/$(TARGET).elf $(BIN_DIR)/$(TARGET).hex<br><br>flash:<br> avrdude -c avrisp2 -p m328p -P /dev/ttyACM0 -U flash:w:$(BIN_DIR)/$(TARGET).hex<br><br>clean:<br> rm -rf $(OBJ_DIR) $(BIN_DIR)<br><br>.PHONY: flash clean</pre><p>Here’s a high-level overview of what each section does:</p><ol><li>The variables at the beginning (CC, CFLAGS, OBJCOPY, SRC_DIR, OBJ_DIR, BIN_DIR, TARGET) define the compiler and its options, directories for source files, object files, and binary files, and the target name.</li><li>The mkdir -p command ensures that the object and binary directories exist.</li><li>The rules that start with $(OBJ_DIR)/%.o specify how to compile each source file into an object file using avr-gcc with the specified compiler flags.</li><li>The $(BIN_DIR)/$(TARGET).elf rule links the object files together and generates an ELF binary. It also uses avr-objcopy to convert the ELF file to Intel HEX format.</li><li>The flash target defines the command to flash the AVR microcontroller using avrdude. It specifies the programmer, microcontroller, port, and the file to write to the flash memory.</li><li>The clean target removes the object and binary directories and their contents.</li><li>The .PHONY directive declares the targets flash and clean as phony targets, indicating that they don&#39;t correspond to actual files.</li></ol><p>At this point, with everything set and your arduino connected to the PC, you just need 2 commands :</p><pre>make</pre><p>and</p><pre>make flash</pre><p>Then, open a console terminal with some program like minicom or putty (don’t forget to put the same baud rate as you defined in the program, otherwise you won’t see anything).</p><p>Have fun!</p><h3>Final thoughts</h3><p>As you could see, this program was not exactly the classic “Hello world” program as we know, because it does not have a format string and the list of arguments.</p><p>However, the point here is to make the same mechanism that printf does (in a more simplified version) : write something to the standard output.</p><p>So with the microcrontroller we try to do the same : write something to a standard output. But as the microcontroller does not have a graphical interface, we send the data via serial communication to our PC.</p><p>I hope this basic project can help you build some core concepts that will be necessary to build other more complex concepts that will come later.</p><h3>Other resources</h3><p>I post something on linkedin about embedded systems from monday to friday. If you are interested, consider following me <a href="https://www.linkedin.com/in/tobias-aguiar-/">here</a>.</p><p>If you want to see another post about arduino projects, read this article <a href="https://medium.com/@tobi.aguiar01/controlling-leds-brightness-with-arduino-without-ide-embedded-tutorials-2-e6fba5a0bfea">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e99515ccf4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I did only those 2 things on my CV do get the double of interviews]]></title>
            <link>https://medium.com/@tobi.aguiar01/i-did-only-those-2-things-on-my-cv-do-get-the-double-of-interviews-5be2aef887b2?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5be2aef887b2</guid>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[cv]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Sun, 14 May 2023 18:05:26 GMT</pubDate>
            <atom:updated>2023-05-14T18:05:26.836Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MuCpmEmpLWGWmlFl" /><figcaption>Photo by <a href="https://unsplash.com/@joaoscferrao?utm_source=medium&amp;utm_medium=referral">João Ferrão</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Back in 2021, when I still was a student looking for an internship.</p><p>The problem : I didn’t have the least idea on how to build a CV. So in my first CV, as you might imagine, it was not good at all.</p><p>I looked in the internet how to build a CV, even on the first site I saw.</p><p>Luckly, I also had a CV template which I got from a teacher.</p><p>In my first year, things didn’t go that well. I just got a few interviews, lots of no’s and one validation (because it was an indication).</p><p>Plus, my lack of experience for building a CV also reflect on my field experience : little to none. I didn’t do a good work.</p><p>Upset with my results, I studied different fields to try to find what I did wrong and I wanted to try new things to improve my results.</p><p>That’s where this articles’s title comes in.</p><p>I just did 2 silly modifications on my CV and I ended up getting the double of interviews in one year.</p><p>Let’s analyse them :</p><h3>Don’t highlight skills, highlight experiences</h3><p>I see many people highlighting their skills.</p><p>There’s nothing wrong with that, as long as you can prove. Because just saying that you have skill X does not prove anything.</p><p>Anyone can say that has skill X or Y.</p><p>The only thing that validate it is either experience or knowledge. If you worked on a project and developed skill X or you can demonstrate your knowledge on it, then you can prove.</p><p>And note that, experience is more powerful than just having the knowledge. You not only have better domain on it but also you had opportunity to solve real problems using it.</p><h3>Be objective with your descriptions</h3><p>A long CV means more chances that the recruiter don’t find it interesting.</p><p>Remember that thousands and thousands of CV’s are sent to companies and read by recruiters.</p><p>It means that you need to find a way to grab their attention. And making a long CV definitely isn’t the solution.</p><p>So here’s what you need to do : show your work being direct and objective in your experiences.</p><p>But what does that mean?</p><p>For each experience that you’re going to include in your CV, you just need three bullets topics, and you’re going to answer the following questions for each bullet :</p><ol><li>What is the main idea behind your project?</li><li>Which problems did you solve?</li><li>Which tools did you use to solve them?</li></ol><h3>Final thoughts</h3><p>Building an attention grabbing CV has nothing to do with tech/hard skills. It is knowing about two main competences : marketing and copy-writing.</p><p>Marketing, because you need to know how you show yourself to the world. And among other thousands CVs, why should them stop to look at yours? Because you know how to grab attention, you know how to market yourself.</p><p>And copy-writing, because the content of your CV should convert the attention grabbing into an interview. It means you convinced them with your experiences that you are the good fit for their job.</p><h3>Other resources</h3><p>I create content about embedded software on linkedin every day. Make sure to follow me here!</p><ol><li><a href="https://medium.com/@tobi.aguiar01/want-to-learn-computer-architecture-start-with-this-assembly-hello-world-program-cafae32e8cff?source=your_stories_page-------------------------------------">Want to learn computer architecture? start with this assembly “hello world” program</a></li><li><a href="https://medium.com/@tobi.aguiar01/3-main-rules-every-embedded-software-developer-should-follow-a4fcebf586a0?source=your_stories_page-------------------------------------">3 main rules every embedded software developer should follow</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5be2aef887b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#define vs const : are they the same?]]></title>
            <link>https://medium.com/@tobi.aguiar01/define-vs-const-are-they-the-same-f59bc2e9a912?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f59bc2e9a912</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[c]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Tue, 09 May 2023 17:18:26 GMT</pubDate>
            <atom:updated>2023-05-09T17:18:26.512Z</atom:updated>
            <content:encoded><![CDATA[<h3>#define vs const : are they the same?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J2qY8J7Ol8n6VL99" /><figcaption>Photo by <a href="https://unsplash.com/@carlgonz?utm_source=medium&amp;utm_medium=referral">Carlos Gonzalez</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In C, <strong><em>#define</em></strong> and <strong><em>const</em></strong> qualifiers are used to define constants, but they differ in several ways.</p><p>In this article, I’m going to introduce you how.</p><h3>Introduction</h3><p>The <strong><em>const</em></strong> keyword and <strong><em>#define</em></strong> preprocessor directiev are both used in programming to define constants, which are values that cannot be changed once they have been defined.</p><p><strong><em>Const</em></strong> is a keyword in C++, C and other programming languages that can be used to declare a variable as a constant.</p><p>Once a variable is declared as <strong><em>const</em></strong>, its value cannot be changed.</p><p><strong><em>#define</em></strong> is a preprocessor directive in C and C++ that can be used to define constants as well as macros.</p><p>When it encounters a line starting with <strong><em>#define</em></strong>, it replaces all occurrences of the defined name with the defined value in the code.</p><h3>#define preprocessor directive</h3><p>In C programming, <strong><em>#define</em></strong> is a preprocessor directive, as mentioned before, that allows the programmer to define a macro, which is a fragment of code that can be used repeatedly throughout the program.</p><p>The basic syntax for a <strong><em>#define</em></strong> directive is:</p><blockquote>#define macro_name macro_value</blockquote><p>Here, <strong><em>macro_name</em></strong> is the name of the macro and <strong><em>macro_value</em></strong> is the value that will be substituted for the macro whenever it appears in the program.</p><p>It is important to note that <strong><em>#define</em></strong> macros are processed by the preprocessor before the program is compiled, so they do not have a type and do not occupy any memory space.</p><p><strong>They are simply text substitutions</strong>, and as such, they should be used with care to avoid potential errors and confusion in the code.</p><h3>const qualifier</h3><p>In C programming, the <strong><em>const</em></strong> keyword is used to declare a variable as a read-only or constant value.</p><p>Once a variable is declared as <strong><em>const</em></strong>, its value cannot be changed during the program execution.</p><p>For example, consider the following code:</p><pre>const int num = 10;</pre><p>Here, the variable <strong><em>num</em></strong> is declared as a constant integer with a value of <strong><em>10</em></strong>. Any attempt to modify the value of <strong><em>num</em></strong> later in the program will result in a compilation error.</p><p>The <strong><em>const</em></strong> qualifier can be used with various data types such as integers, floating-point numbers, characters, arrays, and pointers. It can also be used with function parameters to ensure that the function does not modify the value of the parameter.</p><p>One important thing to note is that <strong><em>const</em></strong> does not make a variable truly immutable.</p><p>It only ensures that the variable cannot be modified directly in the program.</p><p>However, it is still possible to modify a <strong><em>const</em></strong> variable indirectly, such as through pointer manipulation.</p><p>This is a powerful tool that allows programmers to declare variables as read-only or constant. It helps in writing safer, more reliable programs by preventing inadvertent modification of critical data.</p><h3>Finally, what’s the difference between them?</h3><p>Here’s a good illustration which compares both qualifiers, with features being compared with each :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*dLut15q3WN1X7x_MoRqeGA.png" /></figure><p>I see lots of people asking the following question about the topic : “which of those use less memory?”</p><p>Honestly, this is the wrong question.</p><p>Note that you should not worry about that, but rather focus on using the method that is more appropriate for the context.</p><h3>Best practices and use-cases</h3><p>Both <strong><em>const</em></strong> and <strong><em>#define</em></strong> can be useful in different situations, and it&#39;s important to use them appropriately to write high-quality and maintainable code.</p><p><strong><em>Const</em></strong> is often preferred over <strong><em>#define</em></strong> for defining constants because it provides type safety and can be used with more complex data types.</p><p>It also allows for more readable and expressive code since the constant is declared with a specific type and can be used with the same syntax as any other variable.</p><h3>Final thoughts</h3><p>In conclusion, <strong><em>const</em></strong> and <strong><em>#define</em></strong> are both used to define constants in programming, but they have different use cases and best practices.</p><p>It’s important to choose the appropriate method for defining constants based on the needs of the code and the best practices of the language being used.</p><p>The priority should be writing clean, readable, and maintainable code, as I always tell you.</p><p>Thank you for taking the time to read me!</p><h3>Other resources</h3><p>I post something new on embedded systems everyday on linkedin, if you want to know more, check it out <a href="https://www.linkedin.com/in/tobias-aguiar-/">here</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f59bc2e9a912" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Here’s some advice a global director gave me for my embedded career]]></title>
            <link>https://medium.com/@tobi.aguiar01/heres-some-advice-a-global-director-gave-me-for-my-embedded-career-9c1352b7d5ce?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c1352b7d5ce</guid>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Fri, 28 Apr 2023 18:08:44 GMT</pubDate>
            <atom:updated>2023-04-28T18:08:44.289Z</atom:updated>
            <content:encoded><![CDATA[<p>I was doing all it wrong, and maybe so are you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1_cOebClLZl4NLpR" /><figcaption>Photo by <a href="https://unsplash.com/@bdchu614?utm_source=medium&amp;utm_medium=referral">Brendan Church</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>It all started with a comment</h3><p>I received a comment on a LinkedIn post that I shared. By the way, if you’d like to follow me, you can do so <a href="https://www.linkedin.com/in/tobias-aguiar-/">here</a>.</p><p>The comment was from a global director at the company where I work. It was a very valuable comment, and I reached out to him to ask for career advice because of his extensive experience in various fields.</p><p>I messaged him, explaining that I was at the beginning of my career, and his response surprised me.</p><p>He gave me his advice based on four main pillars: Business, Time, Vision, and Expertise. Let’s take a look at his valuable advice.</p><h3>Don’t keep learning only about stuff in your domain</h3><p>You must have known about the <strong>T shape career</strong>.</p><p>You create a good high-level understanding about other fields and domains but you choose something to specialize into.</p><p>Knowing more about other domains can expand your horizons, in case you want to change career someday, and it can give you a more clear vision about the <strong>bigger picture</strong>.</p><p>The bigger picture can be either your domain’s market or about the business chain of your company’s products and services.</p><p>Knowing more about this, you can better understand customer needs and have more ideas about improvement of software designs for example.</p><h3>Who pay your bills is not the company. It’s the client</h3><p>We always think that is the company that pays our bills, but in reality it is not.</p><p>The customers pay the company that pays you. So actually is the customer that pays your salary.</p><p>With that in mind, we need to provide him the best customer experience possible.</p><blockquote>But if you’re not in direct contact with you client, how’s that possible?</blockquote><p>It can be achieved by : <strong>writing the best documentation</strong> you can, making <strong>simple-to-use demos</strong> so the customers won’t have any headache, the list goes on. In the end is all about <strong>aggregating value</strong>.</p><h3>If you want a director position, technical skills aren’t enough</h3><p>The higher you want to go in a company, the more non-technical skills will be required from you.</p><p>This includes :</p><ol><li><strong>marketing</strong> (making your product visible to the world), leadership (how to build a strong team to work and engage towards a vision),</li><li><strong>sales</strong> (converting who sees your product into customers, aggregating value),</li><li><strong>product</strong> (transform market demands into technical requirement so the R&amp;D can have a base to develop it and how innovative it can be),</li></ol><p>the list goes on.</p><h3>Final thoughs</h3><p>To achieve privileged positions, you can’t follow standard paths.</p><p>You need to ask yourself hard questions.</p><p>You need to connect with people who has already been in your position to give you valuable advice.</p><p>And last but not least, you need to take risks and at the same time enjoy the journey. Things take time So just be grateful for the opportunities you get.</p><p>As always, thanks for taking the time to read me!</p><h3>Other resources</h3><p>Having a hard time solving a bug and need some help to better deal with it? check out this article <a href="https://medium.com/@tobi.aguiar01/those-are-the-steps-you-should-take-when-solving-a-bug-94476d6941da">here</a>!</p><p>What would you do if you lose your current job? Would feel desperate? How about a system a develop to secure a new one? check it on this article <a href="https://medium.com/@tobi.aguiar01/the-system-i-would-build-to-secure-a-new-job-if-i-lost-my-current-one-4113ba65985b">here</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c1352b7d5ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Those are the steps you should take when solving a bug]]></title>
            <link>https://medium.com/@tobi.aguiar01/those-are-the-steps-you-should-take-when-solving-a-bug-94476d6941da?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/94476d6941da</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[bugs]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Fri, 21 Apr 2023 17:22:25 GMT</pubDate>
            <atom:updated>2023-04-21T17:22:25.751Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FPjjjnOc3ceSlygr" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This happens to you and maybe you don’t notice it.</p><h3>A constant in life</h3><p>In any development career, you’re going to encounter bugs. In the most unpredictable ways. Take me as an example : I found a little bug on release’s day. I got desperated.</p><p>But today’s journey thought me a valuable lesson, that it has been trying to teach me a while a go : stress and desperation won’t help you solving your bug. Even less if you have a deadline, like I did.</p><p>But we agree that is hard to think when those situations come in. You just paralyzed. And that’s why you need to not rely on yourself when you are on such vulnerable state. Let me explain.</p><h3>Stress is necessary, but at the same time not useful</h3><p>Imagine you are next to a river where you can see yourself through the reflex of the water.</p><p>Now you put your hands on the water, and you start shaking it. It produces some waves. Can you still see yourself ? I’m afraid you can’t.</p><p>Because the water isn’t calm, it is pretty agitated. And you can’t see clearly.</p><p>That’s exactly what happens to us when we are desperate or angry. Those emotions take control of us most of the time and blind our “vision” and logical thinking.</p><p>Getting back to the point, why you shouldn’t rely on yourself?</p><p>because you are not reasoning well.</p><p>If I’m not reasoning well at the this specific time, what should I do?</p><p>When you calm down, you’re going to take a piece of paper. You’re going to write down the following questions :</p><ol><li>Which was the last commit from your version control system that was not having this bug? Go back there.</li><li>Look at the piece of code that was created between this commit. Is the code small? If yes, then comment everything and uncomment until you find the bug.</li><li>Is the code big between the 2 commits? Then, take the logs from the 2 versions and compare each line Found something odd? Go to the code where this log is issued, compare the 2 versions of this specific piece of code, and find in which part can be something missing.</li></ol><p>You can even draw a flow chart illustrating everything.</p><p>And then, next time you have a bug with a deadline to solve it and you get nervous or desperate, <strong>you don’t even think.</strong></p><p>Just take your flowchart, and follow what it says.</p><blockquote>I applied and worked pretty well, and it even helps you calm down as you’re following through it.</blockquote><p>Notice that <strong>every bug is different, even if you are in different software fields</strong>. Every bug requires different actions and steps to be taken.</p><p>However, if you tends to be desperate and emotionally affected (which is my case), I highly recommend having a <strong>backup plan</strong>.</p><p>This means having simple steps written in a paper (or somewhere else) where you can just follow without thinking while you can’t reasoning well.</p><h3>Final thoughts</h3><p>Every one has those tough times, the difference relies on how you deal with it by using your own developed systems and hacks that can protect you from those situations.</p><p>Hope it can help you somehow.</p><p>Happy learning!</p><p>Thanks for reading!</p><h3>Other resources</h3><p>I post something on linkedin about embedded systems every day. If you don’t want to miss it, make sure to follow me <a href="https://www.linkedin.com/in/tobias-aguiar-/">here</a>.</p><p>Want to search for a job or you lost your current one? Take a look at this article <a href="https://medium.com/@tobi.aguiar01/the-system-i-would-build-to-secure-a-new-job-if-i-lost-my-current-one-4113ba65985b">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94476d6941da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The System I would build to secure a new job if I lost my current one]]></title>
            <link>https://medium.com/@tobi.aguiar01/the-system-i-would-build-to-secure-a-new-job-if-i-lost-my-current-one-4113ba65985b?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4113ba65985b</guid>
            <category><![CDATA[jobs]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Mon, 17 Apr 2023 18:03:06 GMT</pubDate>
            <atom:updated>2023-04-17T18:03:06.968Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qb7DLx4sjmMTJqNs" /><figcaption>Photo by <a href="https://unsplash.com/@freestocks?utm_source=medium&amp;utm_medium=referral">freestocks</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>You can use this same strategy to find a job if you don’t have one. It does not only applies for the case where you lose your current job.</p><p>This article is going to be straightforward. Here’s the system you can build and start applying right away. It is for embedded systems, but you can adapt to any other field that might interest you.</p><h3>Some assumptions</h3><p>Before I get in the subject, I’ll assume somethings :</p><ol><li>You don’t have an emergency fund to make big investments.</li><li>You just have enough money for food, rent and some leisure.</li><li>You have a phone and a computer.</li></ol><p>Quick reminder : I’m not here to sell you a dream. This system I’d build won’t get you a job in 5 days. It takes time, practice, failure and improvement to get to the final stage : the job.</p><p>The first think I’d tell you to do before you start any of these steps : be mentally prepared. You’re probably going to receive many “No”s and some ghosting. You’re going to need to endure that tough phase.</p><p>Given that context, let’s get to the steps!</p><h3>Step 1 : Choose a field which is in demand and you are interested in</h3><h4>The balance you are going to search for</h4><p>You need to balance two different things :</p><ol><li>A field which is in demand on the market</li><li>A field of your interest</li></ol><p>This is the two main things you need to take into consideration when choosing your job position.</p><p>A field which is not in demand won’t have much posts for you, leaving the competition really hard. You can still try if you are experienced, but if you are fresh graduate I suggest starting with an in-demand field.</p><p>If you are not interested in the field, you will likely become bored while studying it, making it even more difficult to apply to it. It also applies if you get this job, it will be harder to go to work when you don’t feel like going to.</p><p>Then : pick 5 companies, and 5 job positions in demand (from those 5 companies but not only from them) and I would save everything about those companies, and save somewhere every job posistion that had something to do with those 5 job positions I chose.</p><p>Once that is done, let’s go to the next step.</p><h3>Step 2: preparing cover letters and resumes</h3><h4>The secret : personalization</h4><p>You need to have a copy of :</p><ol><li>A cover letter model</li><li>A resume model.</li></ol><p>Because you will be able to easily personalize it to fit the job proposition needs the best you can.</p><p>Each job position needs a whole skill-set that are not necessarily the same.</p><p>Let’s see an example :</p><blockquote>Although an embedded software developer for wireless sensors and an embedded machine learning engineer share some foundational topics, there are specific skills required for each role that may not translate well to the other.</blockquote><p>With that being said, you’re going to take all job positions you saved. Then :</p><ol><li>Take all job positions that are from the companies you’ve saved.</li><li>Personalize your resume and cover letter to adapt the company needs</li></ol><p>When applying, highlight your experiences, rather than just your skills. Skills can only be proved with experience.</p><p>While you are applying, you’re going to do the next step in parallel.</p><h3>Step 3: Creating a content marketing strategy</h3><h4>Marketing?</h4><blockquote>What? marketing? But I’m an engineer, I don’t know marketing</blockquote><p>My friend, if you are following the step 1, you’re already marketing yourself, but you’re not ready for this conversation yet. But anyway, this is what I would do. You’re not forced to follow.</p><h4>Making yourself visible to the market</h4><p>In parallel with step 1, you’re going to start creating content about the areas you are interested in a professional social media, such as linkedin. This will make your name show up in the research engine.</p><p>Also, it is an opportunity to build network, a topic which will be detailed in the next step.</p><p>Your content don’t need to be complicated. It can be show the projects you’re working on, showing some demo, writing tips that are helping you in those project so you can help others, general tips about your field.</p><h3>Step 4: Skill improvement and networking</h3><p>As you practice and increase your knowledge and experience, failures and new questions will arise.</p><p>That’s when you will see that you need to improve your skills. On the internet there is limitless sources of knowledge that are available! And if you don’t have any money to invest, many are available for free. So, explore as much as you can.</p><p>Search for free online events about the topics you are interested in. Try to build network, show genuine interest on something that people are doing. Ask for advice you are specifically seeking to improve your skills and knowledge from an experienced person.</p><h3>Step 5: Interview preparation</h3><p>As you are applying and building your online presence, you are surely going to be noticed (if you are doing correctly), and you will have some interviews set up.</p><h4>Focus on testing first</h4><p>First thing : the first 3 to 5 interviews, go just for testing and building confidence. Note which are the common questions frequently asked to build your “common questions” list. Search for more online.</p><p>Now, learn those questions. This does not mean knowing the answer by heart. This costs a lot to your brain. This means understanding the philosophy behind it and knowing how to structuring your answer.</p><h4>The 3 why’s</h4><p>One trick that I use : the 3 why’s.</p><p>This means for each question you’re going to answer, you need to give 3 layers of why, if you manage to answer all them, you have good understanding of the question.</p><p>Example :</p><blockquote>What is the main programming language used in embedded systems ? “Your answer” . Why? “Your answer”. Why? “Your answer”. Why? “Your answer” .</blockquote><p>I’m starting to use this and my knowledge is really improving, as well as my problem-solving skills.</p><h3>Step 6: feedback</h3><p>You’re going to receive an answer for each interview, which will be “yes” or “no”.</p><h4>Always be grateful and ask for feedback</h4><p>In any case, send an email appreciating the time and the opportunity. If you receive a no, ask for feedback in the email. For each feedback you receive, return to step 1 and apply this feedback.</p><p>Repeat this cycle until you find a job.</p><p>Simple, right?</p><p>But it is not easy. When you don’t have a job, your job is finding a job.</p><p>If you are willing to apply this entire system correctly for a couple months, it’s impossible not seeing results from it.</p><h3>Final thoughts</h3><p>The main message : <strong>there is no shortcut</strong>. There is no such thing if you want to achieve something and I truly believe that.</p><p>I have always had this bad habit of looking for shortcuts to achieve something in the shortest possible time with the least possible effort.</p><p>When I started stop looking for shortcuts and started facing the long path, it was a game changer for me.</p><p>I hope it can somehow be for you as well.</p><p>Thanks for reading!</p><h3>Other resources</h3><p>I post something about embedded systems everyday on my linkedin. If you want to stay update, lake sure to follow me <a href="https://www.linkedin.com/in/tobias-aguiar-/">here</a>.</p><p>If you liked this article, there is one article that can complement this article’s ideas. Make sure to read it <a href="https://medium.com/@tobi.aguiar01/3-main-rules-every-embedded-software-developer-should-follow-a4fcebf586a0">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4113ba65985b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Want to learn computer architecture? start with this assembly “hello world” program]]></title>
            <link>https://medium.com/@tobi.aguiar01/want-to-learn-computer-architecture-start-with-this-assembly-hello-world-program-cafae32e8cff?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cafae32e8cff</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Mon, 10 Apr 2023 08:16:04 GMT</pubDate>
            <atom:updated>2023-04-10T08:32:32.446Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JuFL4Pswqtl7f6fz" /><figcaption>Photo by <a href="https://unsplash.com/@briankost?utm_source=medium&amp;utm_medium=referral">Brian Kostiuk</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you want to learn computer architecture for embedded systems, learning assembly can be a great option to better understand it.</p><p>To be able to write code in assembly, you necessarily need to know how the processor communicates to the memory and how it behaves in general.</p><p>And the best is : for this article, you don’t need board. We are going to program an ARM assembly “Hello world” program.</p><blockquote>But if we don’t need board, how are we going to program this?</blockquote><p>Your PC is a really powerful tool. It has the capability to simulate other CPUs without being necessary an extern board. It makes use of a powerful concept : <strong>virtualization</strong>.</p><p>We’re going to use a special virtualization tool to start this program : <strong>QEMU</strong>.</p><h3>QEMU : the magical box</h3><p>Let’s put it simple : <strong>QEMU</strong> (short for Quick EMUlator) is a <strong>computer program</strong> that lets you pretend to use a different type of computer on your own computer. It’s kind of like a magical box that lets you play with different types of computers without actually needing to buy them.</p><p>You can use QEMU to explore different operating systems, try out different software, or even test your own programs. It’s a fun way to learn about computers and experiment with new things!</p><p>It works by creating a “virtual machine” that simulates the hardware and software of a different computer. This allows you to run operating systems and software that might not otherwise be compatible with your own computer’s hardware or operating system.</p><h3>First, a quick review on ARM assembly</h3><p>ARM assembly language is a low-level programming language used to write code that runs on ARM architecture-based processors, which are commonly found in embedded systems, smartphones, and other mobile devices.</p><p>It is a human-readable version of the machine code that the processor executes, consisting of a series of instructions that tell the processor what operations to perform, such as adding, subtracting, or moving data between registers and memory.</p><p>Each instruction is represented by a <strong>mnemonic</strong>, which is a short code that represents the operation being performed. For example, the instruction “ADD R0, R1, R2” adds the values stored in registers R1 and R2 and stores the result in register R0.</p><p>So we can have the assembly structure code as being :</p><blockquote>&lt;operation&gt; &lt;dst&gt;, &lt;src&gt;</blockquote><p>or</p><blockquote>&lt;operation&gt; &lt;dst&gt;, &lt;src1&gt;, &lt;src2&gt;</blockquote><p>And there is other formats that won’t be mentioned in this article.</p><p>It also supports conditional execution of instructions based on the state of the processor’s status flags, such as the zero, carry, or overflow flags.</p><h3>Tools you’re going to need</h3><p>I’m assuming that you have some linux distribution on your PC. Here is the tools you’re going to need to download on your terminal :</p><ol><li><strong>sudo apt install binutils-arm-linux-gnueabi</strong> : the GNU binutils package for the ARM Linux GNU EABI target architecture. Binutils are a collection of binary tools such as an assembler, linker, and object file utilities that are used in cross-compiling.</li><li><strong>sudo apt-get install qemu</strong> : This command installs the QEMU emulator, which can emulate several types of processors including ARM. It provides a full-system emulation that allows you to run a complete virtual machine, as explained before.</li><li><strong>sudo apt install qemu-user</strong> : This command installs the QEMU user-mode emulation, which is a binary translator that allows you to run ARM-based executable files on an x86 host system. With this package, you can run ARM-based programs without the need for a complete system emulator.</li></ol><h3>The program that make it happen</h3><h4>before the code</h4><p>The program I provided is written in ARM assembly language and is designed to run on an ARMv7-A architecture.</p><p>The ARMv7-A architecture is a 32-bit architecture that supports the ARM instruction set and Thumb-2 instruction set. It is widely used in a variety of embedded systems and mobile devices, such as smartphones and tablets.</p><blockquote>Why can’t you emulate this program on a cortex-M architecture, since it is simpler?</blockquote><p>Excellent question! QEMU does not emulate the ARM Cortex-M series of microcontrollers, which are typically used in embedded systems. It is designed to emulate full-fledged systems running on ARM processors, such as Linux-based systems, and not microcontrollers.</p><p>However, you can use QEMU with an ARM Cortex-M hardware emulator, such as the STM32 Nucleo development board, to test and debug your ARM Cortex-M assembly programs.</p><p>If you want, I can write an article about that.</p><h4>Let’s get our hands dirty</h4><p>Given this context, let’s dive into the program :</p><pre>.global _start<br><br>.text<br>_start:<br><br>  /* Open standard output file descriptor */<br>   mov r0, #1     /* stdout */<br>   ldr r1, =msg<br>   ldr r2, =len<br>   mov r7, #4      /* system call for write */<br>   swi 0          /* make the system call */<br><br>  /* Exit program */<br>   mov r7, #1      /* system call for exit */<br>   swi 0          /* make the system call */<br><br>.data<br>msg:<br>  .ascii &quot;Hello World!\n&quot;<br>  len = . - msg</pre><p>If you don’t know what a system call is, I dive into it a little bit <a href="https://medium.com/@tobi.aguiar01/the-classic-hello-world-c-program-from-a-different-perspective-f7a664900ee7">in this article</a>, if you want to check it out.</p><p>Let’s see what each part of this program does :</p><pre>.global _start</pre><p>This declares the <strong><em>_start</em></strong> label as a global symbol, which means it can be used by the linker to resolve external references to this symbol.</p><pre>.text<br>_start:</pre><p>This specifies that the following code is in the <strong><em>.text</em></strong> section, which contains executable instructions. <strong><em>_start</em></strong> is the label that marks the beginning of the program code.</p><pre>mov r0, #1</pre><p>This moves the value 1 into register <strong><em>r0</em></strong>. In this context, <strong><em>r0</em></strong> is used as the first argument to the <strong><em>write</em></strong> system call, which specifies the file descriptor of the output stream to write to (in this case, standard output).</p><blockquote>How do you know that?</blockquote><p>In the ARM assembly language, the first argument for a system call (in this case, the <strong><em>write</em></strong> system call) is the file descriptor, which specifies the output stream. Conventionally, file descriptor 0 is used for standard input, file descriptor 1 is used for standard output, and file descriptor 2 is used for standard error. You can refer to the Linux man pages.</p><pre>ldr r1, =msg</pre><p>This loads the address of the <strong><em>msg</em></strong> label into register <strong><em>r1</em></strong>. <strong><em>ldr</em></strong> is used to load data from memory into a register. In this context, <strong><em>r1</em></strong> is used as the second argument to the <strong><em>write</em></strong> system call, which specifies the buffer containing the data to write.</p><pre>ldr r2, =len</pre><p>This loads the value of the <strong><em>len</em></strong> label into register <strong><em>r2</em></strong>. <strong><em>len</em></strong> is defined as the difference between the current location counter (.) and the <strong><em>msg</em></strong> label, which gives the length of the message in bytes. In this context, <strong><em>r2</em></strong> is used as the third argument to the <strong><em>write</em></strong> system call, which specifies the number of bytes to write.</p><pre>mov r7, #4</pre><p>This moves the value 4 into register <strong><em>r7</em></strong>. In this context, <strong><em>r7</em></strong> is used as the system call number for the <strong><em>write</em></strong> system call.</p><blockquote>How do you know that?</blockquote><p>By looking at the <a href="https://chromium.googlesource.com/chromiumos/docs/+/master/constants/syscalls.md#arm-32_bit_EABI">Linux system call table</a>. I’m not capable of inventing such numbers.</p><pre>swi 0</pre><p>This generates a software interrupt to perform a system call. The system call number is stored in <strong><em>r7</em></strong>, and the arguments are passed in <strong><em>r0</em></strong>, <strong><em>r1</em></strong>, <strong><em>r2</em></strong>, <strong>r3</strong>, <strong><em>r4</em></strong>, and <strong><em>r5</em></strong>.</p><pre>mov r7, #1</pre><p>This moves the value 1 into register <strong><em>r7</em></strong>. In this context, <strong><em>r7</em></strong> is used as the system call number for the exit system call.</p><pre>.data<br>msg:<br>  .ascii &quot;Hello World!\n&quot;<br>  len = . - msg</pre><p>This specifies that the following data is in the <strong><em>.data</em></strong> section, which contains initialized data. <strong><em>msg</em></strong> is a label that marks the beginning of the message string, which is defined as a sequence of ASCII characters terminated by a newline character. <strong><em>len</em></strong> is defined as the difference between the current location counter (.) and the <strong><em>msg</em></strong> label, which gives the length of the message in bytes.</p><h4>Compiling and executing</h4><p>As soon as we finished with our program, these are the following commands you need to type in your terminal.</p><pre>$ arm-linux-gnueabi-as -o hello.o hello.s<br>$ arm-linux-gnueabi-ld -o hello hello.o<br>$ qemu-arm -L /usr/arm-linux-gnueabi/ ./hello</pre><p>Here is a breakdown of each line:</p><ol><li><strong>arm-linux-gnueabi-as -o hello.o hello.s</strong> : This command uses the ARM Linux GNU EABI assembler (<strong>arm-linux-gnueabi-as</strong>) to assemble the source code file <strong><em>hello.s</em></strong> into an object file (<strong><em>hello.o</em></strong>) that contains the machine code instructions for the ARM processor. The <strong><em>-o</em></strong> option specifies the output file name.</li><li><strong>arm-linux-gnueabi-ld -o hello hello.o</strong> : This command uses the ARM Linux GNU EABI linker (<strong><em>arm-linux-gnueabi-ld</em></strong>) to link the object file <strong><em>hello.o</em></strong> with any necessary libraries and generate an executable file (<strong><em>hello</em></strong>) that can be run on an ARM processor. The <strong><em>-o</em></strong> option specifies the output file name.</li><li><strong>qemu-arm -L /usr/arm-linux-gnueabi/ ./hello</strong> : This command uses the QEMU emulator for ARM processors (<strong>qemu-arm</strong>) to run the executable file <strong><em>hello</em></strong> on the host system. The <strong><em>-L</em></strong> option specifies the path to the ARM Linux GNU EABI libraries that the executable file needs to run. The <strong>./</strong> before <strong><em>hello</em></strong> specifies that the executable file is located in the current directory.</li></ol><p>As soon as you execute your executable in qemu, you should see a “Hello World” message in your terminal.</p><h3>Final thoughts</h3><p>As you could see, the low-level development is a bit different from the high level one, because you need to do some of the work yourself.</p><p>For example, you don’t need to explicitly call the system calls in your program (as far as I can tell). And there is a lot more when you program complex projects in assembly.</p><p>Let me know if you want more assembly projects articles.</p><p>Thank you for reading me! Happy learning!</p><h3>Other resources</h3><p>If you want to see daily content about embedded systems and embedded software, follow me on my <a href="https://www.linkedin.com/in/tobias-aguiar-/"><strong>linkedin</strong></a>!</p><p>If you want to start on a simpler embedded project, <strong>check </strong><a href="https://medium.com/@tobi.aguiar01/blink-an-arduinos-led-without-ide-embedded-tutorials-1-2e32e29571d0"><strong>this article</strong></a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cafae32e8cff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 main rules every embedded software developer should follow]]></title>
            <link>https://medium.com/@tobi.aguiar01/3-main-rules-every-embedded-software-developer-should-follow-a4fcebf586a0?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4fcebf586a0</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Fri, 07 Apr 2023 19:17:50 GMT</pubDate>
            <atom:updated>2023-04-07T19:17:50.688Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*x3L83G-T6fKaglrU" /><figcaption>Photo by <a href="https://unsplash.com/@tingeyinjurylawfirm?utm_source=medium&amp;utm_medium=referral">Tingey Injury Law Firm</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>I recently wrote a post on linkedin which talks about the fresh embedded software engineers errors on choice of topic to focus on the early career (if you want to check it out, link <a href="https://www.linkedin.com/posts/tobias-aguiar-_learning-embeddedsystems-technology-activity-7049069786470719488-gwGE?utm_source=share&amp;utm_medium=member_desktop">here</a>).</blockquote><p>But to get the best out of your early career and grow as much as possible, there is some rules, or habits, that you can adopt that will make you a better problem solver in embedded systems.</p><h3>Write modular and clean code</h3><p>It’s being repetitive, right? When it’s cliche it’s because it’s true.</p><p>If you do a quick research, the bigger the SaaS company is, the more robust, flexible and decoupled a software is.</p><p>And this is only possible because the code is modular and clean in the development cycle.</p><h4>What it really aggregates</h4><p>In simple terms, what makes a software modular is the exhaustive use of functions as abstraction layers, so you can have a high level overview of the software.</p><p>The magic happens when those little blocks of functions can be tested separately and independently. That’s where the decoupled aspect comes from.</p><p>This give you a few advantages:</p><ol><li>Easier to test</li><li>Easier to spot errors and bugs</li><li>Easier to debug</li><li>Easier tot track on a version control system</li></ol><p>And clean part means writing code that others can understand. Because you never code for your present self.</p><p>You either code :</p><ol><li>For the others</li><li>For your future self</li></ol><h3>Test throughoutly</h3><p>On the book “The pragmatic programmer” (I wrote an article about it here), the author states that people tend to think test are used to make sure their code is working.</p><p>But in reality, it goes beyond that.</p><p>Tests actually can shape the design of your code.</p><p>And we agree that it’s better to test a small piece of code than a large one where you struggle to find where it comes from, right?</p><h3>Embrace failure</h3><p>Although it is the last topic, I consider this the most important one, and it is where most fresh embedded engineers fall into a trap, myself included.</p><p>In my first internship I got one of the best grades of my class. We were evaluated with 3 weights :</p><p>1.Oral presentation performance</p><p>2.Internship report</p><p>3.Work done at the company</p><p>So you can have an idea, I got 4/20 in the work evaluation at the company. Ans I just had a good enough grade to move on because of the two other points.</p><p>Furthermore, after this result I was told I should try something else.</p><p>At that moment I was at a rock bottom. I wanted to give up on my exchange program and go back to Brazil.</p><p>I went to a mentor I had at time to talk about the issue. He made the best provocation I have ever had in my life.</p><p>I explained that I wanted to give up and gave him all the reasons I found in my head.</p><p>He just said to me : “If you do this, then he is right. And tomorrow, what are you going to do?”</p><p>I was so angry, that I started to study consistently as much as I could every week. I failed way more than I did. But I realized something : I getting smarter, and more tolerant to failure.</p><p>People want success without failing, but failure is a mandatory part of the success.</p><p>As always, thank you for reading! Happy learning!</p><h3>Other resources</h3><p>I produce daily content about embedded software on linkedin, follow me <a href="https://www.linkedin.com/in/tobias-aguiar-/">here</a>.</p><p>Want to start your first embedded project with very few resources? Read this article <a href="https://medium.com/@tobi.aguiar01/blink-an-arduinos-led-without-ide-embedded-tutorials-1-2e32e29571d0">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4fcebf586a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[This is what makes you an embedded software engineer]]></title>
            <link>https://medium.com/@tobi.aguiar01/this-is-what-makes-you-an-embedded-software-engineer-75f703343303?source=rss-13681c4e967a------2</link>
            <guid isPermaLink="false">https://medium.com/p/75f703343303</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Tobias Aguiar]]></dc:creator>
            <pubDate>Wed, 05 Apr 2023 10:01:58 GMT</pubDate>
            <atom:updated>2023-04-05T10:01:58.959Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MuVWGfhJ6cqRKC1Y" /><figcaption>Photo by <a href="https://unsplash.com/@thisisengineering?utm_source=medium&amp;utm_medium=referral">ThisisEngineering RAEng</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Preface</h3><blockquote>The author <a href="https://medium.com/u/24f5f16be697">Bennett Garner</a> wrote a really interesting and intriguing article that quotes the following : <a href="https://medium.com/developer-purpose/being-able-to-write-code-doesnt-mean-you-re-a-developer-4153b249755f">being able to write code doesn’t mean you’re a developer</a>. You should give it a read if you haven’t and follow him, he provides really nice insights about software development. Anyway, it is a quote that I couldn&#39;t agree more. Being a coder is different from being a software engineer.</blockquote><p>Basically the idea is you are considered an engineer when the code you write provides value for someone, and it solves a business problem. But wait, if you consider yourself a “coder” you shouldn’t be frustrated about that.</p><p><strong>It’s part of the process.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VHeQ3Q2-blInFIJO" /><figcaption>Photo by <a href="https://unsplash.com/@wocintechchat?utm_source=medium&amp;utm_medium=referral">Christina @ wocintechchat.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The process</h3><p>You can’t start something being already good at it. It’s impossible. It’s like saying when you first start walking when you were a baby you successfully did it without falling.</p><p>So it’s pretty normal that the first software you write won’t be “useful” (useful for who?).</p><p>Take as an example the first embedded tutorial I made <a href="https://medium.com/@tobi.aguiar01/blink-an-arduinos-led-without-ide-embedded-tutorials-1-2e32e29571d0">here</a>. Which kind of problems does it solve? You correct, none.</p><p>Then, what’s the point of making such projects?</p><p>Simply because there are people that just don’t want to climb 2 steps at once. And that’s fine.</p><h3>What’s the right peace?</h3><p>You’ll see lots of different advices here on medium.</p><p>“You need to try this because of this”</p><p>“You need to do that to achieve that in X”</p><p>I’m not saying to not listen. There are plenty of good advices out there. But you shouldn’t make them a rule, not all of them will work on you.</p><blockquote>So what’s your point? What makes an engineer anyway?</blockquote><p>What makes an engineer is when you learn, when you apply it somehow. It can be for a simple exercise or teach someone else.</p><p>When you make mistakes, because it means you’re trying to build something. And mistakes are just an inerent part of the process.</p><p>There is no excellence without mistakes.</p><p>There is no engineer without building something.</p><p>And I’m not talking about big projects. It can be a simple hello world program.</p><p>It doesn’t need to be useful for someone else in the beginning, it can be only for you. If it makes you grow and learn then it is valid.</p><h3>Final thoughts</h3><p>You don’t wake up one day when you get your degree and you simply turn into an engineer. As I said before, it is a process. It’s not binary.</p><p>To be an engineer, your first need to be a coder. Whenever the code you write becomes useful for you and it helps your learning journey, congratulations : an engineer is being born.</p><p>As always, thank you for taking the time to read me!</p><h3>Other resources</h3><p>I’m starting a 60 days challenge, and I’ll be doing <strong>daily post about embedded software</strong>, if you don’t want to miss anything, follow me on <a href="https://www.linkedin.com/in/tobias-aguiar-/">this link</a>.</p><p>Did you know that you can master the embedded fundamentals with just 2 simple questions? Check out the article about it <a href="https://medium.com/@tobi.aguiar01/master-the-fundamentals-of-embedded-systems-with-these-2-must-ask-questions-3f256dd28af4">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75f703343303" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>