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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
2,199 次查看
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

标签 (1)
0 项奖励
回复
1 解答
2,052 次查看
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.
-------------------------------------------------------------------------------

在原帖中查看解决方案

3 回复数
2,052 次查看
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,052 次查看
zhoumaokang
Contributor II

HI

Memory modle is the addressing mode of RAM?

Have a great day,

Zhoumao Kang

0 项奖励
回复
2,053 次查看
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.
-------------------------------------------------------------------------------