2022-02-01 12:49 AM
2022-02-01 01:42 AM
Welcome, @Aher.1, to the community!
Unless you have programmed it somehow, the BIN format does not contain address information where to load it to, nor the type of STM32.
Regards
/Peter
2022-02-01 04:54 AM
The vector table, instruction mix and entropy can be quite effective at narrowing down the targets.
2022-02-01 05:02 AM
@Community member Although this is correct, it involves a lot of effort and would only give a rough indication of the respective family, if at all, don't you think?
2022-02-01 09:41 AM
I'm not sure it takes a "Lot of Effort", it takes knowledge and leverage, and the latter is really easy to find, you're using computers. And the former's not got a lot of the "How Do I" crowd in it. It also helps not to waste effort, ie Edison Approach
Depending on what you're given to look at, visual inspection can eliminate a lot of CPU/MCU candidates. Now clearly some are going to be harder to deal with than others, but let's say a part's shipped in the billions, there's going to be resources and tools behind that. And a lot of repetition and duplication of basic templates, and libraries, by developers who are frequently lazy and under time pressure.
If you can see it's a Cortex-M, the family/model of STM32 could be refined to very few potential candidates, along with the compiler and rough optimization level. The power of elimination and deduction can get you a long way.
2022-02-01 10:00 AM
Regenerating source, now that's a whole other thing, and depends on the size and complexity, and how that scales, but most looking to just copy/clone something don't need to recover the source. The ones looking for the source, are the ones who lost it, or have no idea what they are doing.. Even in patent type work, things will pivot about the specifics, and those opening the door to discovery and access, and identifying failures to disclose.