Microcontroller Embedded C Programming Lecture 10| Installing compiler (GCC) for host (MAC)

 

Installing compiler (GCC) for host (MAC)

 

 

 

How to install GCC in MAC?

Let’s install a host compiler that is GCC on a MAC machine. To install GCC on a Mac machine, you first have to install Homebrew. 

For that, open the terminal and now open the web browser.

Figure 1. Web browser
Figure 1. Web browser

 

And type brew.sh, it is shown in Figure 2.

Figure 2. Copy the command
Figure 2. Copy the command

 

Copy the command (shown in Figure 2), and paste it onto the terminal, and hit enter (Figure 3). 

Figure 3. Paste that command in Terminal
Figure 3. Paste that command in Terminal

 

So, it may ask you to enter the password. 

How to install GCC in MAC
Figure 4. Enter the password

 

Now, this installs the Homebrew packages on the machine. Please be patient until the installation completes. 

After that, to install GCC, type the command brew install gcc and please wait for the completion of the installation.

How to install GCC in MAC
Figure 5. brew install gcc command

 

Then you can just type the command gcc to verify the gcc. And here, we can see that the gcc command is detected, and it runs. (Figure 6)

How to install GCC in MAC
Figure 6. gcc command

 

That’s how you install the host compiler GCC on the Mac machine.

 

FastBit Embedded Brain Academy Courses

Click here: https://fastbitlab.com/course1

 

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.