Porting Connector to Raspberry Pi (ARM11/Debian)

When compiling the compile_and_link sample, the compiler was generating the following types of warnings and errors. These each occur several times in several different areas.

In file included from ..\..\..\..\private\idigi_api.c:28:0: ..\..\..\include/idigi_api.h:522:1: warning: padding struct size to alignment boundary [-Wpadded]
In function 'release_receive_packet': ..\..\..\..\private
etwork_intf.h:387:45: error: cast increases required alignment of target type [-Werror=cast-align]

Researching this, it seems that the ARM processors require different byte alignment that x86/x64 and that is leading to the warning. However, looking at where the error occurs, I don’t believe any of the pointer casts are casting from one struct to another where alignment differences would cause an error (though I very well may have overlooked something). While I could probably get rid of the error by casting to a void* first, that would require changing the private code. Therefore, I removed the -Werror=case-align flag. I still get the -Wpadded warnings, but the code now compiles without error. The connect_to_digi sample also compiles, runs, and connects (it works).

I haven’t tried all of the features, but things seem find with the change in compiler flags. Am I overlooking something that’s going to bite me later on, or it my solution acceptable (or is there a better way to address the issue).

Thanks (I’ve attached the full output from the compile).

Hello

First thank you for taking the time to replicate and record this issue.

Second, engineering has identified this as a defect and will address the defect. When complete a patch will be posted.

Hello

Digi Engineering has a pre-release version that is now available to customers facing this issue.

If you would like to test with this fix and possibly provide feedback, please send a note to maintenance@digi.com and Digi will make the tarball available to you.