12.9.2 Usage Considerations

When using this qualifier, consider the following:

  1. The following attributes are not compatible with __pack_upper_byte:
    bootnearreverse
    dmanoloadxmemory
    eedatapsv, auto_psvymemory
  2. __pack_upper_byte data is best used for large data sets that do not need to be accessed frequently or that do not have important access timing.
  3. Sequential accesses to __pack_upper_byte data objects will improve access performance.
  4. A version of mempcy is defined in libpic30.h, and its prototype is:

    void _memcpy_packed(void *dst, __pack_upper_byte void *src,

                       unsigned int len);
  5. The following style of declaration is invalid for packed memory:

    __pack_upper_byte char *message = "Hello World!\n";

    Here, message is a pointer to __pack_upper_byte space, but the string "Hello World!\n", is in normal const data space, which is not compatible with __pack_upper_byte. There is no standard C way to specify a different source address space for the literal string. Instead declare message as an object (such as an array declaration in Packed Example).
  6. The TBLPAG SFR may be corrupted during access of a packed variable.