The memory module in the NXP's Motor Library (Automotive Math and Motor Control Library Set for NXP MC9S12ZVM devices) is small (14bit addresses). My project's memory module is medium (16bit addresses). When I use the library function to compile, there will be errors, but if I change the project's memory module to small, the code size will be over 16K. When I download the program to the chip, there will be a failure. Is it an addressing problem?
已解决! 转到解答。
Hi
yes, it affects global non-constant data allocation. All global non-constant data must fit into RAM.
Have a great day,
Jun Zhang
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
HI,
The application memory model MUST match with the library model. Otherwise application project will produce build error. it's normal.
Difference of each memory models:
Small Memory Model - data to be fit in 14-bit addresses (< 16 KB)
Medium Memory Model - data to be fit in 18-bit addresses (< 256 KB)
Large Memory Model - data to be fit in 24-bit addresses
Have a great day,
Jun Zhang
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi
yes, it affects global non-constant data allocation. All global non-constant data must fit into RAM.
Have a great day,
Jun Zhang
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------