68HC11 vs MSP430 vs other MCUs - Page 1
Forum section: electronics / general

author: planc
author_rank: Regular Contributor
timestamp: January 08, 2023, 01:25:25 am
content: My MCU programming experience was with the Motorola 68HC11. Here there is a resident debugging program at the firmware called "Buffalo" that you can interact directly. I can go inside the firmware itself and display memory, modify single memory, even display the assembly code by using ASM (memory) like in the following.In the above HC11, the Interrupt vector for RESET is also FFFE, same as the MSP430. However it is stored in ROM unlike in MSP430 which is in flash.I have the following questions.1. In the 68HC11. The interrupt vector address FFF0 to FFFF is in rom. But in the MSP430, it is in flash and also happens to be the password of BSL. However I have seen a working MSP430F2617 where the interrupt vectors at FFF0 to FFFF have same values of FFs which is for blank chip. Can the interrupt vectors really be reassigned? Please confirm and give basic idea how the MCU interrupt vectors addresses can be reassigned to other addresses.2. I read you can modify single memory in EEPROM but for Flash, it is in segments in 512 bytes for the MSP430. But in CCS, you need to upload the entire program just to add even a single byte. Can't you just insert it in segment? What software in MSP430 that you can insert in segment and not upload the entire program just to modify one byte?3. The 68HC11 where you can go inside the firmware and debug by displaying specific memory, modifying single memory and using command ASM <memory>etc. is more elegant. Why didn't they implement this in the MSP430 too?4. Lastly, What other MCUs that can do similar to the 68HC11 where you can, again, go inside the firmware and debug by displaying specific memory, modifying single memory and using command ASM <memory> etc. just like in the screenshot above?Thank you!

author: PCB.Wiz
author_rank: Super Contributor
timestamp: January 08, 2023, 01:51:39 am
content: Quote from: planc on January 08, 2023, 01:25:25 amIn theory, yes, any FLASH MCUcouldlimit to only changed pages, but that is going to be slower in most cases, because you need to read a page and compare before you decide to erase and then download .In most MCUs edits move all the code above that edit up or down.Most download Sw does stop then the HEX info runs out.Quote from: planc on January 08, 2023, 01:25:25 amPretty much all modern MCUs allow you to disasm code, they just use a slightly different approach from the old monitor ROM.These days, some bridge device is used to connect a debug link to the host PC, which run debug code, much more complex than a ASCII terminal.Some these days use a HS-USB link, to help keep the debug side nimble.Buy a small Eval Board for the MCU you like the look of, and have a play with their debug support.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: January 08, 2023, 01:59:06 am
content: Why would you choose to go down on memory lane an find a match to 68HC11? Modern architectures, Arm and SWD can do much more from the comfort of your free IDE, like VS Code. Not to mention Copilot, if we are really start comparing features.

author: westfw
author_rank: Super Contributor
timestamp: January 08, 2023, 02:46:46 am
content: QuoteMSP430 has hardware support for "Background Debug Mode" which enables it to do all of the things you are asking for (and more, at SOURCE code level) in conjunction with a PC-side program ("IDE" or "Debugger.") Most other modern MCUs have something similar ("SWD" for ARMs, DebugWire or UPDI for AVRs, etc.)As the capabilities of these hardware debug assists improved, and PCs and their IDEs became more common and more powerful, the interest in "self-hosted" debuggers and "monitors" died down. But occasionally you still see things likehttps://forums.raspberrypi.com/viewtopic.php?t=336843If you get something like an MSP430 "LaunchPad" from TI, the board includes the target processor plus a chip that interfaces to the hardware debug features and talks via USB to the IDE on your PC. Which is not bad at all, for $10.

author: josip
author_rank: Regular Contributor
timestamp: January 08, 2023, 07:26:38 am
content: Quote from: planc on January 08, 2023, 01:25:25 amYou can do all this in more friendly environment (GUI) IAR or CCS, with breakpoint debugging / stepping by C or assembler instructions with watching variable / memory / registers / whatever. Check attached picture (disassembly window with binary code and assembler instructions is what you are looking for), but you can find youtube videos for live demonstration.Quote from: planc on January 08, 2023, 01:25:25 am1. MSP430 (family) devices vector space is fixed, however on some (I know for F5xx/F6xx) it is relocatable to RAM. But I think that even in this case reset vector / program start address must be at FFFE. If your device have FFFF value at FFFE address than it is (blank device and) not executing anything. It is not moving from FFFE address. You can check this with IAR simulator without any source code and external hardware.2. MSP430 flash controller can write just one byte, but before that this, part (block) of flash must be erased. F2xx flash block size is 64 or 128 bytes (don't remember right know). There is option in tools to rewrite just updated location, and not all. Off course, you can modify only one byte in RAM without any other changes.3 & 4. You can do this with almost any MCU today. Stepping thru assembler code and watching whatever you want to see. Your problem is that all this is new to you, and need to spend some time to become more familiar how to use it.If you have some specific MSP430 question, you can also ask here...https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum

author: brucehoult
author_rank: Super Contributor
timestamp: January 08, 2023, 07:43:38 am
content: Quote from: josip on January 08, 2023, 07:26:38 amNote that, to be precise you can't make any change you want to just one byte. "Erasing" a flash block sets all bits to 1s. Writing to the block can only change 1s to 0s , not 0s to 1s. So you can write to any byte up to 8 times (clearing one bit each time, in arbitrary order) before you need to erase the whole block to write a value with more or different set bits than before.

author: planc
author_rank: Regular Contributor
timestamp: January 08, 2023, 07:47:05 am
content: josip, I've been trying to run CCS for days without any source code but only connected to unlocked MSP430 chip. How do you make it load the machine code and output assembly file in real time debugging mode (with no c file or others)? Please see for this specific question at:https://www.eevblog.com/forum/microcontrollers/to-code-composer-studio-(ccs)-users/Thanks.

author: peter-h
author_rank: Super Contributor
timestamp: January 08, 2023, 08:31:56 am
content: QuoteExactly.However, when writing FLASH (or EEPROM, etc) it always makes sense to do a pre-read and write [whatever blocksize you are writing] if the new data is different. The speedup is dramatic, especially during typical development when one often changes just a few bytes.Curiously it doesn't appear that ST Cube does it; it always does the whole 1MB or whatever.The HC11 is really ancient. I wonder what the production life is now? Some of those old chips ran for 25 years (like the H8/300 I still use, on last time buy 10 years ago and I got loads of stock) but I would expect all to be either finished or coming up to LTB soon.

author: planc
author_rank: Regular Contributor
timestamp: January 08, 2023, 10:07:43 am
content: What was so great about the HC11 was there was this THRSiim11 simulator where you can load the HC11 machine code and it will produce the assembly language and run all the simulations of all registers and even serial output and let you adjust ADC input. There was nothing in the MSP430 that can do that too.. that is, just using the machine code to produce the assembly language and ran all the simulations without using the Debugger on actual chip like MSP-FET. How come?https://download.cnet.com/THRSim11/3000-2212_4-10017030.html