Addressing problem of motor library(Automotive Math and Motor Control Library Set for NXP MC9S12ZVM devices)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Addressing problem of motor library(Automotive Math and Motor Control Library Set for NXP MC9S12ZVM devices)

Jump to solution
2,216 Views
zhoumaokang
Contributor II

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?memory module.pngbuild project.png

Labels (1)
0 Kudos
Reply
1 Solution
2,069 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

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.
-------------------------------------------------------------------------------

View solution in original post

3 Replies
2,069 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

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.
-------------------------------------------------------------------------------

2,069 Views
zhoumaokang
Contributor II

HI

Memory modle is the addressing mode of RAM?

Have a great day,

Zhoumao Kang

0 Kudos
Reply
2,070 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

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.
-------------------------------------------------------------------------------