Вопрос

Here is a brief summary of my problem ...

I couldn't increase the number of coordinators beyond 16, and the connection tables are limited for the PAN and Coordinators. The PAN can have up to 16 nodes in its connection table while the Coordinator supports only 8 nodes. I have PIC18F87J11 FAMILY, and I am using MPLAB C18 Compiler.

COORDINATOR:

The coordinators can have NUM_COORDINATOR set to 16 , but only 8 nodes show up in its connection table. The CONNECTION_SIZE must be 8 or lower, any higher number generates an error.

Increasing the connection size from 8 to 16 gives the following error.

Error - section '__CONNECTION_TABLE' can not fit the section. Section '__CONNECTION_TABLE' length=0x000001d0
Errors    : 1

Increasing the number of coordinators from 16 to 32 gives the following error.

Error - section 'RANDOM_SEND_BUFFER' can not fit the section. Section 'RANDOM_SEND_BUFFER' length=0x00000118
Errors    : 1

PAN:

The PAN can have NUM_COORDINATOR set to 16 and 16 nodes show up in its connection table. The CONNECTION_SIZE must be 16 or below, any higher number produces an error. The End devices fail to connect to the network after 16 nodes are already connected to the network.

Increasing the connection size from 16 to 32 gives the following error.

Error - section '__CONNECTION_TABLE' can not fit the section. Section '__CONNECTION_TABLE' length=0x000001c0
Errors    : 1

Increasing the number of coordinators from 16 to 32 gives the following error.

Error - section 'RANDOM_SEND_BUFFER' can not fit the section. Section 'RANDOM_SEND_BUFFER' length=0x00000118
Errors    : 1

This is the code I am using for ConnectionTable

#if defined(__18CXX)
#pragma udata __CONNECTION_TABLE
#endif
CONNECTION_ENTRY    ConnectionTable[CONNECTION_SIZE];

This is the code I am using for RANDOM_SEND_BUFFER

 #if defined(__18CXX)
 #pragma udata RANDOM_SEND_BUFFER
 #endif

Can someone explain to me why I am getting those build errors?

Thanks!

Это было полезно?

Решение

By default the linker section has a maximum of 256 bytes size. You have to expand the size of a section in the linker script.

Read also: How do I create a variable larger than 256 bytes in MPLAB C18?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top