Is It possible to read the code from Arduino board
Is It possible to read the code from Arduino board, How to do it?
Answer
Before anwsering the question, let's see what happens when you click Upload button on Arduino IDE:
- You write a human-readable code using Arduino language (C/C++)
- Arduino IDE compiles your code into binary code. The binary code is NOT human-readable, and Arduino's MCU can understand it.
- Arduino IDE uploads the binary code to the Arduino board.
So, in the Arduino board, there is no human-readable code but binary code.
Now let's come back to the main question:
- Generally, the answer is no.
- Actually, It is possible to read the code from the Arduino board. However, it is NOT a human-readable code. It is just binary code. Of course, the binary code can be converted to human-readable code. However, The converted code is not the same as the code you wrote: the variable and function's names are not the same, The code flow is not the same... Furthermore, The process of converting the binary code to the human-readable is called reverse engineering. This process is very expensive.
Additional knowledge: Most of MCU has the read-protection option. If this option is enabled, you even cannot read the binary code from the MCU
Buy Arduino
1 × Arduino UNO Buy on Amazon | |
1 × USB 2.0 cable type A/B Buy on Amazon | |
1 × Jumper Wires Buy on Amazon |
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables.
Additionally, some links direct to products from our own brand, DIYables.