custom MS-II code
Read the manual to see if your question is answered there before posting. Many users will not reply if the answer is already available in the manual.
If your question is about troubleshooting, configuration, or tuning, you MUST include your processor type (MS-I or MS-II) and code version in your post. If your question is about PCB assembly or modifications, you must also include the main board version number (1.01, 2.2 or 3.0).
If you have questions about MS1/Extra or MS2/Extra code configuration or tuning, please post them at www.msextra.com Such questions posted here will be moved to: a temporary MSextra sub-forum, where they will be removed after 7 days
The full forum rules are here: Forum Rules, be sure to read them all regularly.
custom MS-II code
MSIIv3 on a 2332 VW
T25 Intercooled Turbo
JAW WBO2, fuel and spark control
Re: custom MS-II code
MSIIv3 on a 2332 VW
T25 Intercooled Turbo
JAW WBO2, fuel and spark control
Re: custom MS-II code
Ignore the "pragma ROM_VAR was not handled" message - I got rid of that in going to the 3.x code and using the correct CODE_SEG and DATA_SEG pragmas, but the message is harmless at least it has been for me for dozens of code versions and enormous code changes. The HCS12 memory structure is a nightmare because its Paged memory is a kluge and because it is very poorly documented.steamer wrote:I just noticed it generated a warning "pragma ROM_VAR was not handled" for the line "#pragma ROM_VAR DEFAULT" before the table* macros are #define'd on about line 1450. Perhaps that's my problem, but I don't know what it means.
Re: custom MS-II code
What I meant to ask was whether or not the absolute address was encoded in the INI file somehow. I think the answer is 'no' and the communication protocol uses offsets from the base to refer to inpram fields. I didn't change anything in inpram so the existing INI should work.The inpram base address isn't 'absolute' and if it changed the compiler would take care of this. It's one reason for using a structure for this purpose.
Yoou do have to make sure you don't go over 1024 bytes total in inpram (or in2ram), and that the INI corresponds exactly to the inpram structure in both sequence, offset and type. Typos here are the most common cause I have experienced of what you see.
I was able to get further setting the default ECU to '1' and reflashing. Now it allows me to set and read variables -- I suspect reflashing solved my earlier problem and not changing the default ECU setting. I find I have to reflash too many times (once is too many), I'm not sure why it is so fragile. Now the TPS and MAP work when connected to the stimulator but there is no RPM signal. I'm guessing I commented out a little too much code.
MSIIv3 on a 2332 VW
T25 Intercooled Turbo
JAW WBO2, fuel and spark control
Re: custom MS-II code
Glad it's not just me. For general information, I found the following Motorola app note (AN2216/D) which explains it relatively well:grippo wrote:The HCS12 memory structure is a nightmare because its Paged memory is a kluge and because it is very poorly documented.
http://www.datasheetarchive.com/AN2216-datasheet.html
Otoh, that is in the context of a 256kB flash chip. I still don't understand what is the advantage of using paged memory in a 64kB
chip, given that in principle all the memory is directly accessible via a 16 bit address. That would seem to happen if you select the
"small" memory model in the compiler, I think?
Am I wrong about that, or was the paged model used to provide an upgrade path to a chip with >64k flash?
Re: custom MS-II code
all of the flash.
Otoh, using the free version of CW it makes no difference to me, since I can only generate 32K of code. So even if I use the banked model,
I might as well just leave the PPAGE fixed to 3C or 3D since that gives me 48K (less 256B for vector storage) together with the two always visible
pages 3E & 3F....