XML fixes and source re-alignment.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12741 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2019-04-14 10:54:32 +00:00
parent c066f1b201
commit 1534bb80c9
3 changed files with 31 additions and 21 deletions

View File

@ -533,7 +533,8 @@ mfsErase(&mfs1);]]></value>
</tags> </tags>
<code> <code>
<value><![CDATA[mfs_id_t id; <value><![CDATA[mfs_id_t id;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + sizeof mfs_pattern512); (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
for (id = 1; id <= id_max; id++) { for (id = 1; id <= id_max; id++) {
@ -562,7 +563,8 @@ for (id = 1; id <= id_max; id++) {
</tags> </tags>
<code> <code>
<value><![CDATA[mfs_error_t err; <value><![CDATA[mfs_error_t err;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + sizeof mfs_pattern512); (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
err = mfsWriteRecord(&mfs1, id_max, sizeof mfs_pattern512 , mfs_pattern512); err = mfsWriteRecord(&mfs1, id_max, sizeof mfs_pattern512 , mfs_pattern512);
@ -644,7 +646,8 @@ mfsErase(&mfs1);]]></value>
</tags> </tags>
<code> <code>
<value><![CDATA[mfs_id_t id; <value><![CDATA[mfs_id_t id;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + sizeof mfs_pattern512); (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
for (id = 1; id <= id_max; id++) { for (id = 1; id <= id_max; id++) {
@ -716,7 +719,8 @@ test_assert(bank_verify_erased(MFS_BANK_0) == FLASH_NO_ERROR, "bank 0 not erased
</tags> </tags>
<code> <code>
<value><![CDATA[mfs_id_t id; <value><![CDATA[mfs_id_t id;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + sizeof mfs_pattern512); (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
for (id = 1; id <= MFS_CFG_MAX_RECORDS; id++) { for (id = 1; id <= MFS_CFG_MAX_RECORDS; id++) {
@ -791,7 +795,8 @@ test_assert(bank_verify_erased(MFS_BANK_1) == FLASH_NO_ERROR, "bank 1 not erased
</tags> </tags>
<code> <code>
<value><![CDATA[mfs_id_t id; <value><![CDATA[mfs_id_t id;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + sizeof mfs_pattern512); (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
for (id = 1; id <= MFS_CFG_MAX_RECORDS; id++) { for (id = 1; id <= MFS_CFG_MAX_RECORDS; id++) {
@ -848,19 +853,20 @@ mfsErase(&mfs1);]]></value>
</tags> </tags>
<code> <code>
<value><![CDATA[mfs_id_t id; <value><![CDATA[mfs_id_t id;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
(sizeof (mfs_data_header_t) + (sizeof mfs_pattern512 / 2)); sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + (sizeof mfs_pattern512 / 4));
for (id = 1; id <= id_max; id++) { for (id = 1; id <= id_max; id++) {
mfs_error_t err; mfs_error_t err;
size_t size; size_t size;
err = mfsWriteRecord(&mfs1, id, (sizeof mfs_pattern512 / 2), mfs_pattern512); err = mfsWriteRecord(&mfs1, id, (sizeof mfs_pattern512 / 4), mfs_pattern512);
test_assert(err == MFS_NO_ERROR, "error creating the record"); test_assert(err == MFS_NO_ERROR, "error creating the record");
size = sizeof mfs_buffer; size = sizeof mfs_buffer;
err = mfsReadRecord(&mfs1, id, &size, mfs_buffer); err = mfsReadRecord(&mfs1, id, &size, mfs_buffer);
test_assert(err == MFS_NO_ERROR, "record not found"); test_assert(err == MFS_NO_ERROR, "record not found");
test_assert(size == (sizeof mfs_pattern512 / 2), "unexpected record length"); test_assert(size == (sizeof mfs_pattern512 / 4), "unexpected record length");
test_assert(memcmp(mfs_pattern512, mfs_buffer, size) == 0, test_assert(memcmp(mfs_pattern512, mfs_buffer, size) == 0,
"wrong record content"); "wrong record content");
}]]></value> }]]></value>
@ -877,10 +883,11 @@ for (id = 1; id <= id_max; id++) {
<value><![CDATA[mfs_error_t err; <value><![CDATA[mfs_error_t err;
size_t size; size_t size;
mfs_id_t id; mfs_id_t id;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
(sizeof (mfs_data_header_t) + (sizeof mfs_pattern512 / 2)); sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + (sizeof mfs_pattern512 / 4));
mfs_id_t n = ((mfscfg1.bank_size - sizeof (mfs_bank_header_t)) - mfs_id_t n = ((mfscfg1.bank_size - sizeof (mfs_bank_header_t)) -
(id_max * (sizeof (mfs_data_header_t) + (sizeof mfs_pattern512 / 2)))) / (id_max * (sizeof (mfs_data_header_t) + (sizeof mfs_pattern512 / 4)))) /
sizeof (mfs_data_header_t); sizeof (mfs_data_header_t);
for (id = 1; id <= n; id++) { for (id = 1; id <= n; id++) {
@ -902,8 +909,9 @@ for (id = 1; id <= n; id++) {
<code> <code>
<value><![CDATA[mfs_error_t err; <value><![CDATA[mfs_error_t err;
size_t size; size_t size;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
(sizeof (mfs_data_header_t) + (sizeof mfs_pattern512 / 2)); sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + (sizeof mfs_pattern512 / 4));
test_assert(mfs1.current_counter == 1, "not first instance"); test_assert(mfs1.current_counter == 1, "not first instance");
err = mfsEraseRecord(&mfs1, id_max); err = mfsEraseRecord(&mfs1, id_max);
@ -1380,7 +1388,8 @@ mfsStart(&mfs1, &mfscfg1);]]></value>
</tags> </tags>
<code> <code>
<value><![CDATA[mfs_id_t id; <value><![CDATA[mfs_id_t id;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + sizeof mfs_pattern512); (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
for (id = 1; id <= id_max; id++) { for (id = 1; id <= id_max; id++) {

View File

@ -480,7 +480,8 @@ static void mfs_test_002_003_execute(void) {
test_set_step(1); test_set_step(1);
{ {
mfs_id_t id; mfs_id_t id;
mfs_id_t id_max = (mfscfg1.bank_size - sizeof (mfs_bank_header_t)) / mfs_id_t id_max = (mfscfg1.bank_size - (sizeof (mfs_bank_header_t) +
sizeof (mfs_data_header_t))) /
(sizeof (mfs_data_header_t) + sizeof mfs_pattern512); (sizeof (mfs_data_header_t) + sizeof mfs_pattern512);
for (id = 1; id <= id_max; id++) { for (id = 1; id <= id_max; id++) {

View File

@ -33,7 +33,7 @@
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/> <intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/> <stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/> <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;offset-flashGetSectorOffset-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[7]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[6]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[5]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[4]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[3]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[2]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[1]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[0]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;next_offset-mfsp-mfsWriteRecord-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;line-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;offset-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;mfs_buffer[447]-null-mfs_test_001_005_execute-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;mfs_buffer[507]-null-mfs_test_001_005_execute-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;rp[506]-rp-mfs_flash_read-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;rp[507]-rp-mfs_flash_read-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;rp-mfs_flash_read-(cast_to_array)&quot; val=&quot;0:511&quot;/&gt;&lt;content id=&quot;data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[0]-data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[1]-data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[2]-data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[3]-data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;CR-flash-eflp-stm32_flash_check_errors-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;w[0]-w-line-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;w[1]-w-line-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;xPSR-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;CR-flash-devp-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;offset-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;sr-stm32_flash_check_errors-(format)&quot; val=&quot;2&quot;/&gt;&lt;/contentList&gt;"/> <stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;sr-stm32_flash_check_errors-(format)&quot; val=&quot;2&quot;/&gt;&lt;content id=&quot;offset-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;CR-flash-devp-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;xPSR-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;w[1]-w-line-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;w[0]-w-line-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;CR-flash-eflp-stm32_flash_check_errors-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[3]-data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[2]-data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[1]-data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[0]-data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32-buffer-mfsp-mfs_flash_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;rp-mfs_flash_read-(cast_to_array)&quot; val=&quot;0:511&quot;/&gt;&lt;content id=&quot;rp[507]-rp-mfs_flash_read-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;rp[506]-rp-mfs_flash_read-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;mfs_buffer[507]-null-mfs_test_001_005_execute-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;mfs_buffer[447]-null-mfs_test_001_005_execute-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;offset-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;line-efl_lld_program-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;next_offset-mfsp-mfsWriteRecord-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[0]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[1]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[2]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[3]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[4]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[5]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[6]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;data32[7]-data32-buffer-mfsp-mfs_bank_check_header-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;offset-flashGetSectorOffset-(format)&quot; val=&quot;4&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList/&gt;&#10;"/> <stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList/&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList&gt;&#10;&lt;memoryBlockExpressionItem&gt;&#10;&lt;expression text=&quot;0x8040000&quot;/&gt;&#10;&lt;/memoryBlockExpressionItem&gt;&#10;&lt;/memoryBlockExpressionList&gt;&#10;"/> <stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList&gt;&#10;&lt;memoryBlockExpressionItem&gt;&#10;&lt;expression text=&quot;0x8040000&quot;/&gt;&#10;&lt;/memoryBlockExpressionItem&gt;&#10;&lt;/memoryBlockExpressionList&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="${selected_resource_loc}"/> <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="${selected_resource_loc}"/>