Click here to Skip to main content
13,198,563 members (47,684 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I'm currently assigned to a project at the University,
where we are teamed up with students from other fields of study.
I have a hard time explaining how code is stored in a microprocessor.

They asked me a question, which I do not know how to answer:

"If a program has been stored in the microprocessor, is it then possible for other firms to take that microprocessor and read the program code in order to make a copy of it?"

Thanks you in advance
Posted 20-Nov-12 5:36am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Depends on the microcontroller, and on how the data has been written to it.

Some have a security bit which when set corrupts some or all of the data when it is transferred out of the device (PIC devices do this -they are called the Code Protection Bits[^]) You explicitly set these bits once you have verified the information in the device against your master file to prevent subsequent access.
Some devices do not have anything like this - the older EPROM based ones in particular are very vulnerable in general.

BNe aware that most of these system can be broken in some way - the info is out there on the net, so this probably shouldnt be your only security mechanism if IP theft is a significant risk with your devices.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Yes and no. It highly depends on many factors. In principle, in some processors architectures, code can be isolated the way it cannot be read in any other way except actually executing this code, which is, of course, does not fully reveal the content of the code memory.

(Some changes of state of the processor can be done strictly one-way. For example, with Intel x86/I64 architectures, it's possible to protect some memory segment which nothing can ever read, no matter in what protection ring. The segment can only be removed, by re-setting the processor or removing power supply.)

In simple processors, this is not the case. Also, the answer depends on what do you call "stored" and what is "in microprocessor". The code executed in microprocessor is not normally stored on it at all. It is stored in RAM, outside the processor. The exclusion is microcode (please see the reference below). Are your talking about some non-volatile memory? Usually, the RAM information which can be protected the way I explained, is stored only when the power is supplied. Some code can be stored in non-volatile memory which is logically act as RAM (example is BIOS, which has volatile and non-volatile memory, another thing is UEFI, which can be considered as BIOS alternative).

So, non-volatile memory outside processor can be read by at least one simple reason: it does not have to be attached to the CPU at all, at the same time, it is preserved when power is off. However, microcode could be totally protected, as its functionality does not require reading its context at all; its execution is engaged only when processor's instructions are get executed, so the presence of microcode is completely hidden from an outside observer.

Some information, just for general understanding:[^],[^],[^],[^],[^],[^].


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171020.1 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100