Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work SWO handlers #1579

Merged
merged 1 commit into from
Mar 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions targets/CMSIS-OS/common/swo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ extern "C" void SwoInit()

extern "C" void SwoPrintChar(char c)
{
ASSERT((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL);
ASSERT((ITM->TER & 1UL ) != 0UL);

uint32_t retryCounter = ITM_WRITE_ATTEMPTS;
bool okToTx = (ITM->PORT[0U].u32 == 1UL);

Expand Down Expand Up @@ -98,13 +95,10 @@ extern "C" void SwoPrintString(const char *s)

// this function is heavily based in the CMSIS ITM_SendChar
// but with small performance improvements as we are sending a string not individual chars
__STATIC_INLINE uint32_t GenericPort_Write_CMSIS(int portNum, const char* data, size_t size)
uint32_t GenericPort_Write_CMSIS(int portNum, const char* data, size_t size)
{
(void)portNum;

ASSERT((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL);
ASSERT((ITM->TER & 1UL ) != 0UL);

char* p = (char*)data;
uint32_t counter = 0;
uint32_t retryCounter;
Expand Down