Skip to content

Commit

Permalink
Merge branch 'main' into networkfusion-ti-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
networkfusion authored Dec 20, 2023
2 parents a13f12a + 36047a5 commit a4964d6
Show file tree
Hide file tree
Showing 22 changed files with 626 additions and 351 deletions.
119 changes: 68 additions & 51 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,13 @@ jobs:

strategy:
matrix:
ST_B_L475E_IOT01A:
TargetBoard: ST_B_L475E_IOT01A
TargetSeries: 'stm32l4xx'
BuildOptions:
NeedsDFU: true
NeedsSRECORD: false
CMakePreset: ST_B_L475E_IOT01A
# ST_B_L475E_IOT01A:
# TargetBoard: ST_B_L475E_IOT01A
# TargetSeries: 'stm32l4xx'
# BuildOptions:
# NeedsDFU: true
# NeedsSRECORD: false
# CMakePreset: ST_B_L475E_IOT01A

# ORGPAL_PALTHREE:
# TargetBoard: ORGPAL_PALTHREE
Expand Down Expand Up @@ -794,9 +794,12 @@ jobs:
vmImage: 'windows-latest'

variables:
DOTNET_NOLOGO: true
- group: sign-client-credentials
- name: DOTNET_NOLOGO
value: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('WIN32_1_9_0_versioncounter', 0)]
- name: REVISION
value: $[counter('WIN32_1_9_0_versioncounter', 0)]

steps:
- template: azure-pipelines-templates/nb-gitversioning.yml
Expand Down Expand Up @@ -840,7 +843,7 @@ jobs:
configuration: 'Release'

- task: DotNetCoreCLI@2
displayName: Install SignTool tool
displayName: Install Sign Client CLI
condition: >-
and(
succeeded(),
Expand All @@ -849,19 +852,22 @@ jobs:
inputs:
command: custom
custom: tool
arguments: install --tool-path . SignClient
arguments: install --tool-path . sign --version 0.9.1-beta.23530.1

- pwsh: |
.\SignClient "Sign" `
--baseDirectory "$(Build.Repository.LocalPath)\build\bin\Release" `
--input "**/nanoFramework.nanoCLR.*" `
--config "$(Build.Repository.LocalPath)\config\SignClient.json" `
--filelist "$(Build.Repository.LocalPath)\config\filelist.txt" `
--user "$(SignClientUser)" `
--secret '$(SignClientSecret)' `
--name "nanoFramework.nanoCLR" `
.\sign code azure-key-vault `
"**/nanoFramework.nanoCLR.*" `
--base-directory "$(Build.Repository.LocalPath)\build\bin\Release" `
--file-list "$(Build.Repository.LocalPath)\config\filelist.txt" `
--publisher-name ".NET nanoFramework" `
--description "nanoFramework.nanoCLR" `
--descriptionUrl "https://github.com/$env:Build_Repository_Name"
--description-url "https://github.com/$env:Build_Repository_Name" `
--azure-key-vault-tenant-id "$(SignTenantId)" `
--azure-key-vault-client-id "$(SignClientId)" `
--azure-key-vault-client-secret "$(SignClientSecret)" `
--azure-key-vault-certificate "$(SignKeyVaultCertificate)" `
--azure-key-vault-url "$(SignKeyVaultUrl)" `
--timestamp-url http://timestamp.digicert.com
displayName: Sign nanoCLR assemblies
continueOnError: true
condition: >-
Expand Down Expand Up @@ -911,16 +917,19 @@ jobs:
ignoreMakeDirErrors: true

- pwsh: |
.\SignClient "Sign" `
--baseDirectory "$(Build.ArtifactStagingDirectory)" `
--input "**/*.nupkg" `
--config "$(Build.Repository.LocalPath)\config\SignClient.json" `
--filelist "$(Build.Repository.LocalPath)\config\filelist.txt" `
--user "$(SignClientUser)" `
--secret '$(SignClientSecret)' `
--name "nanoFramework.nanoCLR NuGets" `
.\sign code azure-key-vault `
"**/*.nupkg" `
--base-directory "$(Build.ArtifactStagingDirectory)" `
--file-list "$(Build.Repository.LocalPath)\config\filelist.txt" `
--publisher-name ".NET nanoFramework" `
--description "nanoFramework.nanoCLR NuGets" `
--descriptionUrl "https://github.com/$env:Build_Repository_Name"
--description-url "https://github.com/$env:Build_Repository_Name" `
--azure-key-vault-tenant-id "$(SignTenantId)" `
--azure-key-vault-client-id "$(SignClientId)" `
--azure-key-vault-client-secret "$(SignClientSecret)" `
--azure-key-vault-certificate "$(SignKeyVaultCertificate)" `
--azure-key-vault-url "$(SignKeyVaultUrl)" `
--timestamp-url http://timestamp.digicert.com
displayName: Sign packages
continueOnError: true
condition: >-
Expand Down Expand Up @@ -1010,8 +1019,10 @@ jobs:
vmImage: 'windows-latest'

variables:
DOTNET_NOLOGO: true

- group: sign-client-credentials
- name: DOTNET_NOLOGO
value: true

steps:
- template: azure-pipelines-templates/nb-gitversioning.yml

Expand All @@ -1037,7 +1048,7 @@ jobs:
configuration: 'Release'

- task: DotNetCoreCLI@2
displayName: Install SignTool tool
displayName: Install Sign Client CLI
condition: >-
and(
succeeded(),
Expand All @@ -1046,19 +1057,22 @@ jobs:
inputs:
command: custom
custom: tool
arguments: install --tool-path . SignClient
arguments: install --tool-path . sign --version 0.9.1-beta.23530.1

- pwsh: |
.\SignClient "Sign" `
--baseDirectory "$(Build.Repository.LocalPath)\build\bin\Release" `
--input "**/nanoFramework.nanoCLR.*" `
--config "$(Build.Repository.LocalPath)\config\SignClient.json" `
--filelist "$(Build.Repository.LocalPath)\config\filelist.txt" `
--user "$(SignClientUser)" `
--secret '$(SignClientSecret)' `
--name "nanoFramework.nanoCLR.CLI" `
.\sign code azure-key-vault `
"**/nanoFramework.nanoCLR.*" `
--base-directory "$(Build.Repository.LocalPath)\build\bin\Release" `
--file-list "$(Build.Repository.LocalPath)\config\filelist.txt" `
--publisher-name ".NET nanoFramework" `
--description "nanoFramework.nanoCLR.CLI" `
--descriptionUrl "https://github.com/$env:Build_Repository_Name"
--description-url "https://github.com/$env:Build_Repository_Name" `
--azure-key-vault-tenant-id "$(SignTenantId)" `
--azure-key-vault-client-id "$(SignClientId)" `
--azure-key-vault-client-secret "$(SignClientSecret)" `
--azure-key-vault-certificate "$(SignKeyVaultCertificate)" `
--azure-key-vault-url "$(SignKeyVaultUrl)" `
--timestamp-url http://timestamp.digicert.com
displayName: Sign nanoCLR assemblies
continueOnError: true
condition: >-
Expand All @@ -1078,16 +1092,19 @@ jobs:
maximumCpuCount: true

- pwsh: |
.\SignClient "Sign" `
--baseDirectory "$(Build.ArtifactStagingDirectory)" `
--input "**/*.nupkg" `
--config "$(Build.Repository.LocalPath)\config\SignClient.json" `
--filelist "$(Build.Repository.LocalPath)\config\filelist.txt" `
--user "$(SignClientUser)" `
--secret '$(SignClientSecret)' `
--name "nanoFramework.nanoCLR.CLI NuGet" `
.\sign code azure-key-vault `
"**/*.nupkg" `
--base-directory "$(Build.ArtifactStagingDirectory)" `
--file-list "$(Build.Repository.LocalPath)\config\filelist.txt" `
--publisher-name ".NET nanoFramework" `
--description "nanoFramework.nanoCLR.CLI NuGet" `
--descriptionUrl "https://github.com/$env:Build_Repository_Name"
--description-url "https://github.com/$env:Build_Repository_Name" `
--azure-key-vault-tenant-id "$(SignTenantId)" `
--azure-key-vault-client-id "$(SignClientId)" `
--azure-key-vault-client-secret "$(SignClientSecret)" `
--azure-key-vault-certificate "$(SignKeyVaultCertificate)" `
--azure-key-vault-url "$(SignKeyVaultUrl)" `
--timestamp-url http://timestamp.digicert.com
displayName: Sign packages
continueOnError: true
condition: >-
Expand Down
14 changes: 0 additions & 14 deletions config/SignClient.json

This file was deleted.

38 changes: 26 additions & 12 deletions src/CLR/Core/CLR_RT_HeapBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,13 +1055,13 @@ CLR_UINT32 CLR_RT_HeapBlock::GetHashCode(CLR_RT_HeapBlock *ptr, bool fRecurse, C
switch (ptr->DataType())
{
case DATATYPE_OBJECT:
crc = GetHashCode(ptr->Dereference(), fRecurse, crc);
crc ^= GetHashCode(ptr->Dereference(), fRecurse, crc);
break;

case DATATYPE_STRING:
{
const char *src = ptr->StringText();
crc = SUPPORT_ComputeCRC(src, (int)hal_strlen_s(src), crc);
crc ^= SUPPORT_ComputeCRC(src, (int)hal_strlen_s(src), crc);
}
break;

Expand Down Expand Up @@ -1135,12 +1135,12 @@ CLR_UINT32 CLR_RT_HeapBlock::GetHashCode(CLR_RT_HeapBlock *ptr, bool fRecurse, C
if (fRecurse && cls.m_target->dataType <= DATATYPE_R8)
{
// pass the 1st field which is the one holding the actual value
crc = GetHashCode(&ptr[CLR_RT_HeapBlock::HB_Object_Fields_Offset], false, crc);
crc ^= GetHashCode(&ptr[CLR_RT_HeapBlock::HB_Object_Fields_Offset], false, crc);
}
else
{
// always starts with the pointer to the object to fully disambiguate
crc = SUPPORT_ComputeCRC(&ptr, sizeof(ptr), crc);
crc ^= SUPPORT_ComputeCRC(&ptr, sizeof(ptr), crc);

if (fRecurse)
{
Expand All @@ -1150,8 +1150,9 @@ CLR_UINT32 CLR_RT_HeapBlock::GetHashCode(CLR_RT_HeapBlock *ptr, bool fRecurse, C
{
do
{
crc = GetHashCode(&ptr[totFields + CLR_RT_HeapBlock::HB_Object_Fields_Offset], false, crc);
} while (--totFields > 0);
crc ^=
GetHashCode(&ptr[--totFields + CLR_RT_HeapBlock::HB_Object_Fields_Offset], true, crc);
} while (totFields > 0);
}
}
}
Expand All @@ -1163,23 +1164,23 @@ CLR_UINT32 CLR_RT_HeapBlock::GetHashCode(CLR_RT_HeapBlock *ptr, bool fRecurse, C
CLR_RT_HeapBlock_Delegate *dlg = (CLR_RT_HeapBlock_Delegate *)ptr;
const CLR_RT_MethodDef_Index &ftn = dlg->DelegateFtn();

crc = GetHashCode(&dlg->m_object, false, crc);
crc ^= GetHashCode(&dlg->m_object, false, crc);

crc = SUPPORT_ComputeCRC(&ftn, sizeof(ftn), crc);
crc ^= SUPPORT_ComputeCRC(&ftn, sizeof(ftn), crc);
}
break;

case DATATYPE_OBJECT_TO_EVENT:
{
CLR_RT_ObjectToEvent_Source *evtSrc = (CLR_RT_ObjectToEvent_Source *)ptr;

crc = GetHashCode(evtSrc->m_eventPtr, false, crc);
crc = GetHashCode(evtSrc->m_objectPtr, false, crc);
crc ^= GetHashCode(evtSrc->m_eventPtr, false, crc);
crc ^= GetHashCode(evtSrc->m_objectPtr, false, crc);
}
break;

default:
crc = SUPPORT_ComputeCRC((const void *)&ptr->DataByRefConst(), ptr->GetAtomicDataUsedBytes(), crc);
crc ^= SUPPORT_ComputeCRC((const void *)&ptr->DataByRefConst(), ptr->GetAtomicDataUsedBytes(), crc);

break;
}
Expand Down Expand Up @@ -1315,6 +1316,19 @@ bool CLR_RT_HeapBlock::ObjectsEqual(
break;

case DATATYPE_STRING:
case DATATYPE_CLASS:
case DATATYPE_BOOLEAN:
case DATATYPE_CHAR:
case DATATYPE_I1:
case DATATYPE_U1:
case DATATYPE_I2:
case DATATYPE_U2:
case DATATYPE_I4:
case DATATYPE_U4:
case DATATYPE_I8:
case DATATYPE_U8:
case DATATYPE_DATETIME:
case DATATYPE_TIMESPAN:
return Compare_Values(pArgLeft, pArgRight, false) == 0;
break;

Expand Down Expand Up @@ -1639,7 +1653,7 @@ CLR_INT32 CLR_RT_HeapBlock::Compare_Values(const CLR_RT_HeapBlock &left, const C
// deal with special cases:
// return 0 if the numbers are unordered (either or both are NaN)
// this is post processed in interpreter so '1' will turn into '0'
if (__isnand(left.NumericByRefConst().r4) || __isnand(right.NumericByRefConst().r4))
if (__isnand(left.NumericByRefConst().r4) && __isnand(right.NumericByRefConst().r4))
{
return 1;
}
Expand Down
6 changes: 0 additions & 6 deletions src/CLR/WireProtocol/WireProtocol_App_Interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ uint32_t WireProtocolLastPacketSequence = 0x00FEFFFF;

uint8_t WP_App_ProcessHeader(WP_Message *message)
{
// check for reception buffer overflow
if (message->m_header.m_size > WP_PACKET_SIZE)
{
return false;
}

message->m_payload = receptionBuffer;

return true;
Expand Down
24 changes: 23 additions & 1 deletion src/CLR/WireProtocol/WireProtocol_Message.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ uint8_t WP_Message_VerifyHeader(WP_Message *message)

#endif

// check for reception buffer overflow
if (message->m_header.m_size > WP_PACKET_SIZE)
{
return false;
}

return true;
}

Expand Down Expand Up @@ -267,8 +273,16 @@ void WP_Message_Process()
// of the statemachine to avoid flooding the trace.
TRACE0_LIMIT(TRACE_VERBOSE, 100, "RxState==WaitForHeader\n");

len = _size;

WP_ReceiveBytes(&_pos, &_size);

if (_size == len)
{
// no new bytes received, bail out
break;
}

// Synch to the start of a message by looking for a valid MARKER
while (true)
{
Expand All @@ -291,10 +305,18 @@ void WP_Message_Process()
}

// move buffer one position to the left
memmove((uint8_t *)&(_inboundMessage.m_header), ((uint8_t *)&(_inboundMessage.m_header) + 1), len);
memmove(
(uint8_t *)&(_inboundMessage.m_header),
((uint8_t *)&(_inboundMessage.m_header) + 1),
len - 1);

// update pointer and expected size
_pos--;
_size++;

// sanity checks
_ASSERTE(_size <= sizeof(_inboundMessage.m_header));
_ASSERTE(_pos >= (uint8_t *)&(_inboundMessage.m_header));
}

if (len >= sizeof(_inboundMessage.m_header.m_signature))
Expand Down
7 changes: 4 additions & 3 deletions src/nanoFramework.Graphics/TouchPanel/Devices/XPT2046.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ extern TouchInterface g_TouchInterface;

bool TouchDevice::Initialize()
{
g_TouchDevice.Initialize();
ReadsToIgnore = 1;
ReadsPerSample = 1;
MaxFilterDistance = 1; // This is actually squared value of the max distance allowed between two points.
MaxFilterDistance = 1; // This is actually squared value of the max distance allowed between two points.
return true;
}

bool TouchDevice::Enable(GPIO_INTERRUPT_SERVICE_ROUTINE touchIsrProc)
{
if (touchIsrProc == NULL) {};
if (touchIsrProc == NULL)
{
};
return TRUE;
}

Expand Down
2 changes: 1 addition & 1 deletion targets-community
Submodule targets-community updated 58 files
+1 −0 .github/PULL_REQUEST_TEMPLATE.md
+1 −0 CMakePresets.json
+23 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/CMakeLists.txt
+53 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/CMakePresets.json
+15 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/README.md
+330 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/board.c
+1,008 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/board.h
+11 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/common/CMakeLists.txt
+90 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/common/Device_BlockStorage-DEBUG.c
+90 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/common/Device_BlockStorage.c
+416 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/common/usbcfg.c
+17 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/common/usbcfg.h
+109 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/launch.json
+48 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/managed_helpers/GHI_FEZ_CERBERUS_NF.Adc.cs
+55 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/managed_helpers/GHI_FEZ_CERBERUS_NF.Gpio.cs
+9 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/CMakeLists.txt
+97 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/STM32F405xG_booter-DEBUG.ld
+97 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/STM32F405xG_booter.ld
+819 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/chconf.h
+517 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/halconf.h
+23 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/halconf_nf.h
+84 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/main.c
+360 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/mcuconf.h
+9 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/mcuconf_nf.h
+18 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoBooter/target_board.h.in
+11 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/CMakeLists.txt
+87 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/STM32F405xG_CLR-DEBUG.ld
+87 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/STM32F405xG_CLR.ld
+819 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/chconf.h
+529 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/halconf.h
+23 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/halconf_nf.h
+81 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/main.c
+360 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/mcuconf.h
+10 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/mcuconf_nf.h
+12 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/nanoHAL.cpp
+18 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/nanoCLR/target_board.h.in
+15 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_BlockStorage.c
+12 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_BlockStorage.h
+23 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_common.c
+35 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_common.h.in
+32 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_system_device_adc_config.cpp
+8 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_system_device_i2c_config.cpp
+8 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_system_device_pwm_config.cpp
+18 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_system_device_spi_config.cpp
+8 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_system_devices_dac_config.cpp
+112 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_system_io_ports_config.cpp
+44 −0 ChibiOS/GHI_FEZ_CERBERUS_NF/target_system_io_ports_config.h
+21 −21 ChibiOS/MBN_QUAIL/ffconf.h
+2 −0 ChibiOS/NESHTEC_NESHNODE_V1/CMakePresets.json
+1 −0 ChibiOS/NESHTEC_NESHNODE_V1/common/CMakeLists.txt
+38 −0 ChibiOS/NESHTEC_NESHNODE_V1/common/targetHAL_ConfigurationManager.cpp
+21 −21 ChibiOS/NETDUINO3_WIFI/ffconf.h
+21 −21 ChibiOS/PybStick2x/ffconf.h
+2 −0 ChibiOS/ST_NUCLEO144_F439ZI/CMakePresets.json
+19 −19 ChibiOS/ST_NUCLEO144_F439ZI/ffconf.h
+2 −0 ChibiOS/ST_NUCLEO144_F746ZG/CMakePresets.json
+3 −1 README.md
+75 −21 azure-pipelines.yml
Loading

0 comments on commit a4964d6

Please sign in to comment.